You should remove the app key from this post.
Is the mod_rewrite module and mod_negotiation module enabled for apache? Are you pointing to the public folder of the laravel install (laravel/public) or just to the root path (laravel/)
Can you list a snippet of the routes/web.php file?
christopherh0rn liked this reply
Thanks for the app key heads up, removed.
Mod_rewrite and mod_negotiation are both enabled. My apache virtualhost config is pointing to the public_html directory. Looking at how the site is set up, there is an override of publicPath() in app/Application.php that is as follows:
public function publicPath() { return $this->basePath.'/../public_html'; }
This doesn't appear to be working in my local setup, any ideas why?
The routes appear to be generated in subdirectories of laravel/extensions/
pokurivijay liked this reply
So it sounds like this is an older version of Laravel. Can you check the composer.json file and see what the laravel/framework or laravel/laravel number shows?
I'm not terribly familiar with anything before 5.3 but you may be able to run that redirect conditionally.
Something like
public function publicPath() {
if ( config('app.env') == "production" ) {
return $this->basePath.'/../public_html';
} else {
// run whatever code is default
}
}
christopherh0rn liked this reply
The laravel/framework is listed as "5.4.*".
The directory structure is identical to the one on the production server so I'm not sure why the publicPath override is working there and not here.
Maybe clean the views, routes cache.
Run
composer dump-autoload
Run
php artisan cache:clear
php artisan view:clear
php artisan route:clear
php artisan config:clear
The solution was to run
php artisan extension:autoload
Many thanks everyone for their help.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community