F
Filament2d ago
Omar

Resources are not rendered

"bezhansalleh/filament-shield": "^3.3", "ibrahim-bougaoua/filaprogress": "^0.1.0" "joaopaulolndev/filament-edit-profile": "^1.0" "tomatophp/filament-simple-theme": "^1.0" Hello, I created my project and everything is normal, but I installed some libraries as normal and it works normally, but when I create a new resource, it does not render in the dashboard.
No description
No description
Solution:
I really don't know what could have generated this, but I created a new project and started reconfiguring and now it's reading the new resources, thanks for the help.
No description
Jump to solution
12 Replies
awcodes
awcodes2d ago
Because your user doesn’t have permission to use them because of shield. You need to also generate the shield stuff for that resource and give your user permission to them.
Omar
OmarOP2d ago
I don't fully understand, I previously created the client model, configured it and finally executed migrations and created the resource and registered it in this segment but with the new model it didn't work, is that why you are telling me that it can fail? since I don't see in the documentation a command to register it and create a policy and it still doesn't show me the resource
No description
Omar
OmarOP2d ago
No description
awcodes
awcodes2d ago
It’s in the shield readme.
Omar
OmarOP2d ago
It still doesn't work, run the command "php artisan shield:generate --all" it generates the permissions but in the permissions assignment section I don't get the created models
Omar
OmarOP2d ago
No description
No description
Omar
OmarOP2d ago
and if you notice well the super_admin has all the permissions but they do not appear
awcodes
awcodes2d ago
I’m pretty sure it’s because of a policy / permissions issue. Maybe ask in the shield channel. Or maybe you have cached views.
Solution
Omar
Omar2d ago
I really don't know what could have generated this, but I created a new project and started reconfiguring and now it's reading the new resources, thanks for the help.
No description
Omar
OmarOP13h ago
After working a lot with this plugin I saw that the cache can greatly affect the final to solve run these commands "php artisan filament:optimize" "php artisan filament:optimize-clear"
toeknee
toeknee11h ago
@omar, you just need clear. Optimizing then clearing makes no sense
Omar
OmarOP9h ago
After deleting and redoing the project, the same thing happened, it did not load the new resources, so it was not a solution, that was where I saw the commands to clear the filament cache and with these the problem was solved.

Did you find this page helpful?