根据 Laravel 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' => true,
'expired-session-redirect' => url(env('APP_URL'))
我已将会话的生命周期设置为 120
分钟,但我感觉我的用户在 120 分钟之前就退出了。
那是错字吗?他们的意思是 120 秒,即 2 分钟吗?
任何人都可以对此有所了解吗?
原文由 code-8 发布,翻译遵循 CC BY-SA 4.0 许可协议
请将关闭时过期的 true 修改为 false: