403 Forbidden in Production or Staging with FilamentPHP
APP_ENV is set to local, I can access the admin panel without any issues. However, when I switch to APP_ENV=production or staging, I get a 403 Forbidden error when trying to access the admin panel.
I have already defined canAccessPanel() in the User model to always return true:
public function canAccessPanel(Panel $panel): bool
{
return true;
}
1 Reply
is the model implementing the FilamentUser contract?
try to run php artisan optimize:clear