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

tokaaiman12's avatar

Make Roll for a moderator

I am working on making different auth roles but I can not get it right. I have made a role for user and admin but I want to add a role for a moderator too and I am facing some difficulties.

Here's my Users table

public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('first_name');
            $table->string('last_name');
            $table->string('intro')->nullable();
            $table->string('email')->unique();
            $table->string('password');
            $table->timestamp('email_verified_at')->nullable();
            $table->integer('admin')->default(0);
            $table->string('mobile')->nullable();
            $table->string('image')->nullable();
            // $table->timestamp('last_login'); (listen to the Illuminate\Auth\Events\Login event)
            $table->rememberToken();
            $table->timestamps();
        });
    }

What should i do next?

0 likes
1 reply

Please or to participate in this conversation.