
Good content takes time and effort to come up with.
Please consider supporting us by just disabling your AD BLOCKER and reloading this page again.
In this article, I will show you how to increase the session timeout in Laravel.
NOTE: Laravel session timeouts are set in minutes
We will be covering the following topics
Increase the session timeout for 1 year.
.env
SettingsSESSION_LIFETIME=525600
365 days * 24 hours * 60 minutes = 525600 minutes
You can even directly edit lifetime
in the session config settings as shown below.
As you see by default it will read from the .env
file. If you by chance delete the SESSION_LIFETIME
in .env
file then it will add 43200 minutes.
<?php
use Illuminate\Support\Str;
return [
.......
'lifetime' => env('SESSION_LIFETIME', 43200),
.......
];
Hope you got to know how to increase the session timeout in Laravel. Don't forget to share with your friends.
Proper Way To Validate MIME Type Of Files While Handling File Uploads In PHP
Cache Static Files With NGINX Server
What Is Composer? How Does It Work? Useful Composer Commands And Usage
Why namespace And use Keywords Used In PHP
What Is HTTP? Different HTTP Methods And Status Codes Explained With Examples
Route Model Binding In Laravel & Change Default Column id To Another Column
Securely Connect Server MYSQL DB From Sequel Pro / MYSQL Workbench
composer.json v/s composer.lock
Use Different PHP Versions In Ubuntu / Linux
Create Zip File On The Fly With Streaming Download In PHP Laravel
Install Linux, NGINX, MYSQL, PHP (LEMP Stack) on Ubuntu
Lazy Load YouTube And Other Videos In Website