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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -