1 頁 (共 1 頁)

手動登入

發表於 : 2018-12-28 10:16:35
yehlu
https://stackoverflow.com/questions/326 ... t-password

14

You can 'manually' log a user in in two diefferent ways:

// log user in by ID
Auth::loginUsingId([id of user]);
Or

$user = User::find([id here]);
// or maybe
$user = User::whereUsername([username here])->first();

// and then
Auth::login($user);
See the documentation for authentication.