I am overwriting session.timeout value in one of the middleware (for Laravel web app) but it doesn\'t seem to be affecting in terms of timing out a session. Tho
The problem occurs because the session has already started, and after that you are changing session lifetime configuration variable.
The variable needs to be changed for current request, but the user already has a session with lifetime specified.
You have to change your login method. And do following steps:
config(['session.lifetime' => 1440]);I recommend using helper to change config on the fly.
config(['session.lifetime' => 1440]);