You can use Laravel’s Auth
facade to log in as any user directly from your code.
Method 1
$user = App\Models\User::find(1);
\Auth::login($user);
Method 2
\Auth::loginUsingId(1);
You can use Laravel’s Auth
facade to log in as any user directly from your code.
Method 1
$user = App\Models\User::find(1);
\Auth::login($user);
Method 2
\Auth::loginUsingId(1);