Increase Session Timeout In Laravel

Increase Session Timeout In Laravel

If you want to increase your session life time then you can easily do it from configuration file in laravel. laravel provide session. php there is a 'lifetime' key option for setting time in minutes. in session configuration file there is a also several option for set driver, timeout, expire_on_close and encrypt etc

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

  1. Session Settings In .env File
  2. Settings In config/settings.php File

Session Settings In .env File

Increase the session timeout for 1 year.

.env Settings


Calculation for 1 year (365 days)

365 days * 24 hours * 60 minutes = 525600 minutes

Settings In config/session.php File

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.


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.


Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Php how to delete multiple rows through checkbox using ajax in laravel

In this article i will let you know to delete multiple rows through checkbox using ajax in laravel and before delete we will give a confirmation message.

How to Hire Laravel Developers and How Much Does It Cost.

Want to make the most out of the latest Laravel technology? Here is your guide on how to hire the best Laravel developer, and at the right price. 

How to perform migration rollback in laravel

Sometimes we need to rollback one specific migration. Here, in this article we will discuss about the migration rollback in laravel.

Laravel Development Company

Skenix Infotech is a top Laravel Website Development Company with Expert Laravel Developers that provides robust Laravel Development Services at fair costs.

5 Laravel’s Hidden Gems

Spread the love1. Stop on first validation error By default, Laravel will check for all validation rules and return a list of errors. But if you want to stop this process after first validation failure, that’s how you can achieve…Read More→