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

uniqueginun's avatar

payload column in sessions table

I was wondering what is the big string stored in payload column in sessions table used for?

0 likes
3 replies
mvd's avatar

Hi @uniqueginun

It stores the encoded(base64_encode) data from a session.

Example

$request->session()->put('key', 'value');

value (and some more info as user ID and the current timestamp) will be encoded stored in the payload column.

uniqueginun's avatar

now I'm using file driver session in my app and I want to store data in my sessions table not for maintaining user session but just to track user login activity. where should I but my piece of code? I put it in listener for login event and the data inserted successfully but the session id stored in database table doesn't equal session id of the file.

Please or to participate in this conversation.