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

uniqueginun's avatar

Laravel jetsream session table

Hello,

I'm trying to find the code where Jetstream inserts data into sessions table. I believe it's a listener for login event. but I couldn't find it.

0 likes
2 replies
uniqueginun's avatar
uniqueginun
OP
Best Answer
Level 9

I found it. it's in

class DatabaseSessionHandle
{
	public function write($sessionId, $data)
    {
        $payload = $this->getDefaultPayload($data);

        if (! $this->exists) {
            $this->read($sessionId);
        }

        if ($this->exists) {
            $this->performUpdate($sessionId, $payload);
        } else {
            $this->performInsert($sessionId, $payload);
        }

        return $this->exists = true;
    }
}

Please or to participate in this conversation.