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
Solution:Jump to 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
6 Replies
Check if you have the canAccessPanel on your User model on production
Thank for your reply, I have commented canAccessPanel out at the moment. But on the local machine it works, just fine.
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
It's the first thing that the link I put says
Thanks... I have set the return to true for now. I will come back to this later.