Get Current User Id laravel 8 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();