Seperated Table/Model Auth is possible for Filament Panel ?
i want make "Users" and "Admins" auth system, these two independent models to access the filament panel is it possible ?
2 Replies
You should be able to make 2 guards. Then specify the guard in
config/filament.php
'guards' => [
..........
'admin' => [
'driver' => 'session',
'provider' => 'admins',
],
],
'providers' => [
............
'admins' => [
'driver' => 'eloquent',
'model' => App\Models\Admin::class,
],
],
Create a new model App\Models\Admin that extends Illuminate\Foundation\Auth\User class:
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
class Admin extends Authenticatable
{
// ...
}
Thank you