Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eddy1992's avatar

Laravel Session Cookie

Hi guys, I was wondering how could we set ttl for the Laravel session cookie? I see that it is not affected by the config

'lifetime' => 120,

The laravel_session cookie ttl is set to -1 by default somehow and I do not know from where I could change this value?

Please assist.

0 likes
3 replies
bugsysha's avatar

Have you tried doing php artisan config:clear or php artisan config:cache?

eddy1992's avatar

I am using redis to store sessions and when I see laravel_session cookie ttl it shows me -1 and now the redis storage is going to blow up as its size is increasing.

Please or to participate in this conversation.