Recently I came to find out that session in laravel doesn't get expired even after the browser is closed. Is it a bug?

Go to your session.php file inside the config directory.

In the session lifetime section, you can see the session's expire_on_close array with value set as false as shown below.

 
'expire_on_close' => false, 

Set it as true as shown below and you're done with it.

 
'expire_on_close' => true,    

Send Your Answer

The comment/answer feature from this section has been removed. Please visit our new section Recently I came to find out that session in laravel doesn't get expired even after the browser is closed. Is it a bug? to add comments or answer. Thankyou.