Monday, February 27, 2017

[SOLVED]How to get user(authenticated) information even when user is not logged in?

I want to show user information publicly from built-in users table in Laravel. More specifically, Anyone can see user information(name, email, username) without logged in. I've used these in blade file:



But it only works when user logged in otherwise shows errors. Even I've used ELOQUENT in controller and have passed $user object with by view. I'm attaching images so that you can understand my problem. This is my PagesController file enter image description here
And this is my welcome.blade.php file
enter image description here



via S M Iftakhairul

Advertisement