有沒有辦法讓進入應用程序的用戶不注銷?例如,如果用戶關閉應用程序,我需要將其打開并且不需要再次重新登錄。
1 回答

撒科打諢
TA貢獻1934條經驗 獲得超2個贊
在你的config/session.php中
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to immediately expire on the browser closing, set that option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 120), // either change in your .env file, if there, or the default number to 9999 (minutes)
'expire_on_close' => false, // this is what you are looking for
- 1 回答
- 0 關注
- 127 瀏覽
添加回答
舉報
0/150
提交
取消