php - Laravel 5.2 Auth::check() on exception pages (layouts) -


when abort(404) laravel 5.2 returns error page. when call auth::check() of auth::user() through dump() method return null.

but want custom error page current logged-in user on screen (for example in layouts/app.blade.php want in menu: goodmorning username).

i tried enable web middleware on app/exceptions/handler.php didn't work.

anny suggestions?

you add custom error message:

abort(404, 'ow noo, error 404'.auth::user()->id); 

and in error page:

{{ $exception->getmessage() }} 

Comments

Popular posts from this blog

javascript - Feed FileReader from server side files -

c++ - What's the differece between of link to a dynamic file and as a input object? -

Android Unit Testing / Mockito: android.location.Location not mocked -