Laravel不活动时间设置 [英] Laravel Inactivity time setting

查看:87
本文介绍了Laravel不活动时间设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When user logged-in and remains inactive, How many seconds after that system logouts the user automatically? How to change this setting?

推荐答案

假设您正在使用会话驱动程序来处理身份验证,则可以在/app/config/session.php文件中更改空闲会话过期的时间.

Assuming you are using the session driver to handle your authentication, you can change the time period for an idle session to expire in the /app/config/session.php file.

/*
|--------------------------------------------------------------------------
| 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,

这篇关于Laravel不活动时间设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆