chiiya / filament-access-control

Admin user, role and permission management for Laravel Filament

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Argument #1 ($user) must be of type FilamentUser

imrancoder opened this issue · comments

Chiiya\FilamentAccessControl\Policies\FilamentUserPolicy::viewAny(): Argument #1 ($user) must be of type Chiiya\FilamentAccessControl\Models\FilamentUser, App\Models\User given, called in

i have already updated filament config file auth.pages.login value with \Chiiya\FilamentAccessControl\Http\Livewire\Login::class

Did you update the guard as well?

'auth' => [
    'guard' => env('FILAMENT_AUTH_GUARD', 'filament'),

Make sure that you're not overwriting FILAMENT_AUTH_GUARD with a different value.

I'm getting the same issue.

image

image

Managed to get in. I needed to update the policies to use FilamentUser:
image

Closing due to inactivity.

Make sure you use FilamentUser in your policies and update your guard correctly.