Brandon Romano
Brandon Romano

Reputation: 1020

Where is Session::put() data stored using database session driver in Laravel PHP?

I'm currently using the database session driver to store my sessions in Laravel.

I understand that the user sessions are stored in the database, but does the data from a Session::put get stored?

For example:

Session::put('userID', $user->id);

Where is the data about the userID being stored?

Upvotes: 3

Views: 6716

Answers (1)

alexrussell
alexrussell

Reputation: 14202

Under default settings your sessions are stored in a table called 'sessions' in your default database connection.

Each session will have a payload which contains all sorts of data, but your userID will be in the payload for your session's row somewhere.

Upvotes: 4

Related Questions