laravel auth login user code example
Example 1: laravel auth user_id
$userId = Auth::id();
Example 2: laravel get auth user id
// Get the currently authenticated user's ID...
$id = Auth::id();
Example 3: get user auth in laravel
Auth::user();
Example 4: auth::login in laravel
public function manualLogin(){
$user = User::find(1);
Auth::login($user);
return redirect('/');
}
or
Auth::logout();
Example 5: make authentication in laravel
composer require laravel/ui:^2.4
php artisan ui vue --auth