活动会话登录-laravel

时间:2020-06-26 02:46:14

标签: php laravel

是否有一种方法可以不注销进入应用程序的用户?

例如,如果用户关闭了该应用程序,则我需要将其打开,而无需再次进行新的登录。

1 个答案:

答案 0 :(得分:0)

在您的 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