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

dipcb05's avatar

All Session User storing

I am using Jetstream pack for login + dashboard setup. I am not well habituated with Jetstream. I need to store every user's session data in the session database, i am making a column named 'status', it will define is it logged in or not. session migration =

    public function up()
    {
        Schema::create('sessions', function (Blueprint $table) {
            $table->string('id')->primary();
            $table->foreignId('user_id')->nullable()->index();
            $table->string('ip_address', 45)->nullable();
            $table->string('status')->nullable();
            $table->text('user_agent')->nullable();
            $table->longText('payload');
            $table->integer('last_activity')->index();
        });
    }

But it stored only the loggedin account in the session database. Where can i modify it?

0 likes
1 reply
jlrdw's avatar

You can write status to session like any session data. You don't need to add fields. You can setup another table to store information.

1 like

Please or to participate in this conversation.