Hello,
I have a fresh Install of Laravel/filament/shield and it works perfectly on local machine. When I uploaded to production via Envoyer/Forge, I had to run php artisan shield:install to create the superadmin. I successfully created user. This user logs in and a 403 error appears.
Here is snippet of composer.json...
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.2",
"bezhansalleh/filament-shield": "^3.2",
"filament/filament": "^3.2",
"filament/forms": "^3.2",
"filament/tables": "^3.2",
"laravel/framework": "^11.9",
"laravel/tinker": "^2.9",
"livewire/livewire": "^3.5"
Regards,
Khalid
Here is snippet of composer.json...
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.2",
"bezhansalleh/filament-shield": "^3.2",
"filament/filament": "^3.2",
"filament/forms": "^3.2",
"filament/tables": "^3.2",
"laravel/framework": "^11.9",
"laravel/tinker": "^2.9",
"livewire/livewire": "^3.5"
Regards,
Khalid
Solution
Thats the point, on local envs you can access all panels, but if your app is in prod you need to have that function on the model, otherwise you'll get 403, if you want the user to have access 100% just make it return true