laravel user is authenticated code example
Example 1: laravel auth user_id
$userId = Auth::id();
Example 2: how to check if there is an authenticated user laravel
if (Auth::check()) { // The user is logged in... }
Example 3: laravel authentication
composer require laravel/ui
php artisan ui vue --auth