Laravel 5.5 get current login user details using Auth
In this post we will give you information about Laravel 5.5 get current login user details using Auth. Hear we will give you detail about Laravel 5.5 get current login user details using AuthAnd how to use it also give you demo for it if it is necessary.
Today, we are share with youu how to get current login user details in laravel. we are always need to sometime current login user details like id, name, email, profile picture etc..
So, here we are share with you how to get in to way. you also get current login user details in controller and blade in same way.
[ADDCODE]
Using Helper:
$user = auth()->user();
print($user->id);
print($user->name);
print($user->email);
Using Facade:
$user = Auth::user();
print($user->id);
print($user->name);
print($user->email);
We are hope this is helpfull to you…
Hope this code and post will helped you for implement Laravel 5.5 get current login user details using Auth. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs