Today, I will show you how to increase session timeout in laravel 7. You will learn you set session lifetime in laravel 7. We will avail you to give an example of laravel 7 increase session timeout.
if you increase session juncture in laravel 7 then you can use bellow two solutions. Two solutions in first solution in utilizing. env file and second solution in config file used.
you can simply use increased session lifetime in laravel.
rudimentally, you can not set a lifetime session for aeonian but you can set in minutes for session expiration juncture. so I will set 1-year juncture for session expire
60 * 24 * 365 = 525600
Here i will show how to increase lifetime from env file and configuration file. so let's see both example as bellow:
You can easy to define value in minutes in your env file as bellow.
.env
SESSION_LIFETIME=525600
then after open your config/session.php and change the following into it.
use Illuminate\Support\Str;
return [
.....
'lifetime' => env('SESSION_LIFETIME', 120),
.....
]
config/session.php
use Illuminate\Support\Str;
return [
.....
'lifetime' => 1 * (60 * 24 * 365),
.....
]
i hope you like this small article.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
Angular 12 Copy to Clipboard Example Tutorial
There are so many JavaScript plugin avai...How To Connect MongoDB in Express Application
In this article, i will share with you h...Laravel 8 Jetstream login with email verification
Laravel provides variety of login method...Form validation with Jquery Ajax in Laravel 8
Laravel is a great website application f...jQuery text method
jQuery text() method allows you to get t...