You want to manually log a user in.
This logs the user into the current session, bypassing any authentication.
$user = User::find($user_id); Auth::login($user);
You can also specify
true as the second parameter to set the "remember me" cookie.
Auth::attempt() method does this automatically.
In face, if the authentication is successful,
Auth::attempt() will call
But, if you need to bypass authentication altogether, this is a great method to use. It's especially useful when testing: just create a temporary route to log a user in using this method.
This will fire the