Answers for "laravel login using id in guard"

PHP
6

how login one user with id in laravel

public function manualLogin(){
    $user = User::find(1);
    Auth::login($user);
    return redirect('/');
}
///////////////////////////////////////////////////////////////
// or 

Auth::logout();
Posted by: Guest on May-24-2021
3

laravel get auth user id

// Get the currently authenticated user's ID...
$id = Auth::id();
Posted by: Guest on March-31-2020

Code answers related to "laravel login using id in guard"

Browse Popular Code Answers by Language