To increase the session timeout limit in Laravel, you’ll need to do the following:
- Modify the
SESSION_LIFETIME
variable in your Laravel application’s.env
file: 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
lifetime
option in thesession
configuration file: You can also modify the session timeout limit by setting thelifetime
option in theconfig/session.php
configuration 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.