Target [Illuminate\Database\Eloquent\Model] is not instantiable

I have the UserResource, which I guess, working all fine sometime before, however I find now I am not abe to create a new User (Target [Illuminate\Database\Eloquent\Model] is not instantiable.)

The EditUser works fine though

How to solve this?

Please help asap
Solution
I think the issue is this part:
getLocationIdGroup(fn (Model $user): bool => $user->id == auth()->user()->id),

What does that method to? Where/when is the callback evaluated? You are probably not passing the user model
Was this page helpful?