sathish
Filament 3, connect two tables admins or users for login
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel) : Panel
{
return $panel
->default()
->id('admin')
->path('admin')
->authGuard('admin')
->login(CustomLogin::class)
->colors([
'primary' => Color::Amber,
])
-------------
}
}
is possible to add two panel in the PanelProvider?
13 replies
Filament 3, connect two tables admins or users for login
Thanks for suggestion, I have two guards admin or users
Filament::auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false)
Is possible to add guard in the above code?
Like
Filament::guard('user')->auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false);
Filament::guard('admin')->auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false)
13 replies
Filament 3, connect two tables admins or users for login
Thanks for suggestion
Filament::auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false)
Is possible to add guard in the above code?
Like
Filament::guard('user')->auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false);
Filament::guard('admin')->auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false)
13 replies