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

codingprogress's avatar

Laravel session

Is there a way to temporary set the expiration of a session using the session helper in Laravel?

0 likes
8 replies
Sinnbeck's avatar

Thats not quite how sessions work in laravel. You could use a cookie, database or cache. What do you need to store?

1 like
codingprogress's avatar

@Sinnbeck I see, I'm currently trying to store temporary an identifier for only 10 minutes so once it expires it will need to generate a new one.

codingprogress's avatar

@Sinnbeck Hi, just have some question. Is it alright to just use the file storage or it would be better to use redis?

Please or to participate in this conversation.