手动认证用户
auth()->loginUsingId(5);auth()->login($user);auth()->once(['username' => 'mattstauffer']);
// or
auth()->onceUsingId(5);auth()->once([
'last_name' => 'Stauffer',
'zip_code' => 90210,
])Last updated
auth()->loginUsingId(5);auth()->login($user);auth()->once(['username' => 'mattstauffer']);
// or
auth()->onceUsingId(5);auth()->once([
'last_name' => 'Stauffer',
'zip_code' => 90210,
])Last updated