setting auth facade in laravel code example
Example 1: artisan make auth
composer require laravel/ui
php artisan ui vue --auth
Example 2: laravel check auth
use Illuminate\Support\Facades\Auth;
if (Auth::check()) {
// The user is logged in...
}
Example 3: laravel force login by id
Auth::login($user);