Laravel 5.1 Configuration Session Lifetime Apply Changes

simple question here. In my laravel config/session.php I have changed the lifetime value from the default 2 hours to this:

    | Session Lifetime
    | Here you may specify the number of minutes that you wish the session
    | to be allowed to remain idle before it expires. If you want them
    | to immediately expire on the browser closing, set that option.

    'lifetime' => 1440,

    'expire_on_close' => true,


However, even though this is what I have on my server, it still sticks to the default 2 hour session. I can verify this by seeing the cookie laravel_session which always maxes out in 2 hours.

What am I missing? Is there a separate configuration file or value I need to change to apply my new lifetime?

Edit: Well apparently you can’t expect both the lifetime and the expire_on_close option to both be operating at the same time because they utilize two different types of cookies, but I still don’t understand why if I have the expire_on_close set to true why my cookie is expiring in 2 hours rather than when the browsing session ends?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

php artisan config:cache applies changes to the configuration files!

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x