error after HasName statement
I need to indicate a different hasname, I followed the guide and in my User.php model I have:
But I get the error:
Class App\Models\User contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Filament\Models\Contracts\FilamentUser::canAccessPanel)
I get the error even if I only put FilamentUser, if I use HasName alone, I don't get the error
Solution:Jump to solution
The error message is telling you what PHP requires: If you're going to implement the FilamentUser contract, then you must fully implement all the methods that that contract requires. The error message also tells you exactly what method you haven't implemented on your User class yet (ie: the canAccessPanel() method). You can see more about canAccessPanel in the Filament docs.
1 Reply
Solution
The error message is telling you what PHP requires: If you're going to implement the FilamentUser contract, then you must fully implement all the methods that that contract requires. The error message also tells you exactly what method you haven't implemented on your User class yet (ie: the canAccessPanel() method). You can see more about canAccessPanel in the Filament docs.