I have APP_DEBUG=true in the .env file:
APP_ENV=local
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://test.dev
I've deliberately use incorrect incorrect url (eg: test.dev/asdsadsa) which does not in the web.php route file.
I expected to get an laravel debug error when route does not exist
Sorry, the page you are looking for could not be found.
NotFoundHttpException in RouteCollection.php line 161:
However, it keep showing 404 error page (views/errors/404.blade.php) even APP_DEBUG is set to true.
What I have tried:
1 - I even tested to make sure laravel can read .env file:
Route::get('/', function() {
dd(env('APP_DEBUG'));
});
return true
2 - php artisan config:cache did not fix it.
3 - chmod -R 777 storage did not fix it.
if you have 404 error page in views/errors it will be displayed, and if you haven't, NotFoundHttpException will be displayed.
I'm very late to the game here, but if nothing else worked try clearing all cache and then run:
php artisan optimize:clear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With