Resource is not visible in navigation menu

Hello, I hope you guys are doing great. In development environment I generated a resouece and all it is ok, then I brought all source code and the resource that I had created is not visible in the navigation menu. Do you know what I would check out? Thanks
Solution:
Finally, I figured it out making a clean deploy. I deleted all files in production enviroment and moved all files again. The App worked. Thanks. #solved...
Jump to solution
10 Replies
Mohamed Ayaou
Mohamed Ayaou3mo ago
Do you have some Roles/Permissions system (e.g Filament Shield) that can hide it due to the roles? as the admin doesn't have the roles for new resources
ingeday
ingedayOP3mo ago
No, I don’t have roles system. It’s strange, because in development it is visible I was thinking It could be related to cache. I cleared the cache but It’s not worked.
Mohamed Ayaou
Mohamed Ayaou3mo ago
are you using OPCache or filament:optimize ? Did you create the resource via terminal or manually? or maybe the name of the navigation label of the resource is similar to another one so only one is visible, try to access it via URL directly and run php artisan route:list to check if it is registred correctly? I use all of these commands to clear the cache completely:
Artisan::call('cache:clear');
Artisan::call('view:clear');
Artisan::call('config:clear');
Artisan::call('route:clear');
Artisan::call('event:clear');
Artisan::call('icons:clear');
Artisan::call('optimize:clear');
Artisan::call('filament:clear-cached-components');
Artisan::call('filament:optimize-clear');
Artisan::call('clear-compiled');
Artisan::call('opcache:clear');
Artisan::call('cache:clear');
Artisan::call('view:clear');
Artisan::call('config:clear');
Artisan::call('route:clear');
Artisan::call('event:clear');
Artisan::call('icons:clear');
Artisan::call('optimize:clear');
Artisan::call('filament:clear-cached-components');
Artisan::call('filament:optimize-clear');
Artisan::call('clear-compiled');
Artisan::call('opcache:clear');
also ctrl + shift + r in the browser to clear its cache (shift + e on mac)
ingeday
ingedayOP3mo ago
I created the resource through terminal command. It works In development env correctly but in the hosting I transferred all source code with a github actions. The route is listed correctly with php artisan route:list
Mohamed Ayaou
Mohamed Ayaou3mo ago
is it showing 404 erro?
ingeday
ingedayOP3mo ago
The route is accessed correctly via browser I decided (temporarily) to make a link manually in the AdminPanel
Mohamed Ayaou
Mohamed Ayaou3mo ago
Oh, so it is just the navigation issue mostly due to the name duplication
ingeday
ingedayOP3mo ago
To show a link in the admin panel only Do I need to create the resource file or is there anything else I have to do?
Mohamed Ayaou
Mohamed Ayaou3mo ago
Only the resource file and its model and database migration try to create another one or try to change the name, label, and the group label. if you are using multi-langs be sure about the translation since the navigation system in filament depends on the labels
Solution
ingeday
ingeday2mo ago
Finally, I figured it out making a clean deploy. I deleted all files in production enviroment and moved all files again. The App worked. Thanks. #solved

Did you find this page helpful?