In this trick we are going to see how to get logged in user data in laravel. You can get logged in user data using Auth facade in laravel.
Below is simple Auth facade example
Getting specific key like name, email from Auth Facade
$userInfo=\Auth::user(); $userInfo->name; // return name of loggedin user $userInfo->email; // returns loggedin user email
This post is submitted by one of our members. You may submit a new post here.