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

mohamadAbdelhady's avatar

how to handle session stored in relational database

laravel session stored in database, do I handle it like any database or there is abetter way to handle it.

0 likes
5 replies
mohamadAbdelhady's avatar

if i wanted to retrieve or store data from session do i use helper function or use sql query.

Snapey's avatar

You would be advised to NOT try writing to the session store directly. There are some situations where reading the session store might be useful, and having it stored in the database makes that possible.

Please or to participate in this conversation.