User Registration with Administrator Approvals

Sometimes we need to control who can register for the app and who can't. This project shows how to add Administrator approval with pending verification page and Laravel Middleware.

FilamentExamples ThumbBase (43)

Get the Source Code:

How it works

Let's start by creating our Roles table:

Migration

Schema::create('roles', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});

Then, we can create our Model with a few Role constants:

app/Models/Role.php

 
class Role extends Model
{
public const ADMIN = 1;
public const USER = 2;
 
protected $fillable = [
'name',
];
}

Next, we will cover these:

  • User Verification Resource where Admin can verify Users and give them access
  • Custom Registration page
  • A middleware to prevent access to the application
  • Custom "Waiting for Verification" page
  • Email notifications
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 59 Premium Examples for $99 Only Project Examples for $59