Auth::user() get code example
Example 1: get logged user id laravel
$id = Auth::user()->id;print_r($id);
Example 2: make auth in laravel 7
composer require laravel/ui "^2.0"
$id = Auth::user()->id;print_r($id);
composer require laravel/ui "^2.0"