To increase the session timeout limit in Laravel, you’ll need to do the following:
- Modify the
SESSION_LIFETIMEvariable in your Laravel application’s.envfile: This variable specifies the number of minutes that a user’s session will remain active before it times out. You can increase the value of this variable to increase the session timeout limit.
For example, to set the session timeout limit to 2 hours, you would set the SESSION_LIFETIME variable to 120 in your .env file.
- Modify the
lifetimeoption in thesessionconfiguration file: You can also modify the session timeout limit by setting thelifetimeoption in theconfig/session.phpconfiguration file. This option specifies the number of minutes that a user’s session will remain active before it times out.
For example, to set the session timeout limit to 2 hours, you would set the lifetime option to 120 in the config/session.php configuration file.
