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?
abort(404, 'ow noo, error 404'.auth::user()->id);
and in error page:
{{ $exception->getmessage() }}
Comments
Post a Comment