Level 51
That's how you get the session lifetime in minutes.
Config::get('session.lifetime')
With each new activity the session renews the lifetime.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi everyone. I want to show user auto logout time (session expired time). How can I access user session. This is my login controller:
'systemUserName' => ['required'],
'password' => ['required'],
]);
if (Auth::attempt($credentials)) {
$request->session()->regenerate();
return redirect()->intended('/users');
}
return back()->withErrors([
'email' => 'The provided credentials do not match our records.',
]);
there is no auto-logout. There is a time after which your session is no longer considered valid. Any requests puts the session expiry back to its initial value, eg 120 minutes from now.
Please or to participate in this conversation.