jeudi 7 septembre 2017

Laravel with different session lifetimes

Q: How to create sessions with different lifetimes in Laravel 5?

This question is not a duplicate of this question. I do not want to use it for any kind of sign in or register. I simply want to store it for 5mins because the call to fetch this data sits on a different server and takes a while to fetch.

The problem is that I have another session that needs to be stored for longer and currently using the global config for this session:

/*
|---------------------------------
| Session Lifetime
|---------------------------------
*/

'lifetime' => 30,
'expire_on_close' => true,

How can I give them different lifetimes? Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire