闲置Account Locked
分钟后,如何制作X
并锁定用户。并让他/她输入密码并重新登录。我怎样才能做到这一点?我需要在Auth\LoginController
中创建新方法还是做什么?救命。
答案 0 :(得分:0)
Laravel已包含此功能。查看配置文件config/session.php
。它包含一个名为lifetime
的配置密钥,正是您所需要的:
/*
|--------------------------------------------------------------------------
| 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),
如您所见,也可以通过环境变量SESSION_LIFETIME
进行设置。