手動登入

http://laravel.com/

http://kejyun.github.io/Laravel-4-Docum ... roduction/
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

手動登入

文章 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.
回覆文章

回到「laravel」