this auth user laravel code example
Example 1: laravel auth user_id
$userId = Auth::id();
Example 2: laravel authentication
composer require laravel/ui
php artisan ui vue --auth
$userId = Auth::id();
composer require laravel/ui
php artisan ui vue --auth