Laravel不活动时间设置

时间:2014-06-10 05:56:26

标签: laravel timeout logout

当用户登录并保持不活动状态时,该系统会在多长时间后自动注销用户?如何更改此设置?

1 个答案:

答案 0 :(得分:30)

假设您正在使用会话驱动程序来处理身份验证,您可以在/app/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' => 120,

'expire_on_close' => false,