Laravel 5 - env local debug true no errors shown

I had a situation where I had the exact same symptom, some routes were not providing any feedback, just a white page, no error in the log no information at all.

Turns out, I was adding a new middleware, and I forgot to return $next($request) from my handle method. This was even more frustrating, because this middleware did not apply to every route, so I assumed that there was an intermittent error that was being thrown but not displayed on these routes.


As Blair said, it may turn out that you put some wrong code in the middleware or in 'Exceptions/Handler.php' e.g. :

if($e->getStatusCode()===404) { ... }

instead of

if($e instanceof NotFoundHttpException) { ... }


php artisan optimize and if it still does not work delete the file storage/meta/compiled.php as mentioned in a forum topic on Laracasts

I had the same problem and the artisan command did the trick.

UPDATE

I found out that a nice way to workaround storage folder related issues is to set www-data as its owner. I'm using two commands:

sudo chown $(whoami):www-data . -R

and

sudo chown www-data: storage -R

From Laravel 5.1 it may be necessary to do this last command on bootstrap folder too.


I have worked around the issue by chmod -R 777 storage/ on my host machine (Mac OS X). On my guest machine (Ubuntu 14.04) chmod -R 777 storage/ did not change permissions actually.