FilamentF
Filamentโ€ข2y ago
warNuttah

500 server error after updating user model

i created a user on my production server
php artisan make:filament-user
to let the admin sign in, then i implemented this code on my User model:

public function canAccessFilament(): bool

    {

        return str_ends_with($this->email, '@yourdomain.com')

            && $this->hasVerifiedEmail();

    }


i had to change the class to abstract because i kept seeing this message from laravel extra intelisense:

PHP Fatal 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) in /var/www/html/coellobranding/app/Models/User.php on line 12


so after pushing the changes to the server now there is a 500 server error response ๐Ÿ™‚
Was this page helpful?