laravel 7 get logged in users id code example
Example 1: current user laravel
$user = auth()->user(); print($user->id);print($user->name);print($user->email);
Example 2: laravel 6 get user id
$id = \Auth::id();
$user = auth()->user(); print($user->id);print($user->name);print($user->email);
$id = \Auth::id();