Slide 9
Slide 9 text
IDのみで取得する内容
User::where('user_id',
$request->input('user_id'))->first()->id;
$id = Auth::loginUsingId($user_id);
公式ドキュメント(英語)
Authenticate A User By ID
To log a user into the application by their ID, you may use the loginUsingId method. This method accepts the primary
key of the user you wish to authenticate:
Auth::loginUsingId(1);
// Login and "remember" the given user...
Auth::loginUsingId(1, true);