laravel how to get logged in user info in view code example
Example 1: get logged user id laravel
$id = Auth::user()->id;print_r($id);
Example 2: is users logged in laravel blade
@auth
// user logged in
@else
// not logged in
@endauth
$id = Auth::user()->id;print_r($id);
@auth
// user logged in
@else
// not logged in
@endauth