Confused with given Filament demo structure
I am working on a project in intership and I received something like a demo to be placed on fresh Laravel/Filament project. I had tried to use Filament a little before to acustumed to how it works and as I understand you make resources with command and they go to app/Filament/[Name]. This demo doesnt have app/Filament folder but it has app/Providers/Filament inside it provider files for all 4 panels I was told about. Also in resources/views/filament there is 4 folders with same panel names like building. So I am confused if filament can really work without making resources in app/Filament with just providers and blade files
Solution:Jump to solution
I had to do
```php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan cache:clear...
50 Replies
Some folder paths in Filament are fully customizable, so probably in those app/Providers/Filament providers (look inside) it's configured to take the resources from elsewhere than app/Filament
Yes thanks I found that they display where Resources should be and I also found example project that uses 2 different panels and they just place resources inside app/filament/[Panel name]/resources just like mine are setup. I made new resources while selecting which panel to do it in, in my case it was Building and it made new resource in app/filament/building/resources but still none of them show up. I tested with different resources and different panel types since I have 4 but they all just display empty pages with extra widgets so I am not even sure. Here it should have 2 resources I added to resident panel but nothing shows up
https://i.imgur.com/lrLgb0f.png
maybe check the permissions in policies whether your user is allowed to see those menu items? Look for viewAny() in Policies. But just a blind guess, hard to say without digging int othe full code.
this is setup with custom login where only those user types that login can see their panels so user with role of resident can only view /resident and this system does work, I tested with few users and they could only go to their panels. but for individual resources I dont know. Provider files look almost identical to ones in example project I saw and it had nothing with adding permissions for resources files
The path of the resources matches the
->discoverResources()
path? Maybe you can share the PanelProvider for the panel you just created a resource. Also share a screenshot of the project structure.You're showing the Resident path.
it should be identical since they both were made in same way
And only Building panel is not showing resources?
both arent showing
Is any of those panels showing resources?
no
Do you have policies anywhere?
Also I have files inside resources/views/filament/[Panel name] which seem be to similar
https://i.imgur.com/9Fbzo1E.png
Can you share the output of
php artisan about --only=filament
Filament ................................................................................................
Blade Icons ...................................................................................... CACHED
Packages ................................................ filament, forms, notifications, support, tables
Panel Components ................................................................................. CACHED
Version ......................................................................................... v3.3.37
Views ..................................................................................... NOT PUBLISHED
Blade Icons ...................................................................................... CACHED
Packages ................................................ filament, forms, notifications, support, tables
Panel Components ................................................................................. CACHED
Version ......................................................................................... v3.3.37
Views ..................................................................................... NOT PUBLISHED
That seems okay. But those views look weird.
Do you have Controllers?
well when I was given this file
was actually commented off so I was even more confused
yes Controllers for custom login
That's all?
Custom routes?
it is for login, register, authentication
all of that works as far as I tried
I made few users and if you login with resident you can only go to /resident
Can you share one of those resources?
Resource. Not the controller
this is main funtion in login controller
oh
Codebin Paste - resource
Codebin Paste:
Description: aaa
Language: php
Last Edited: 9/25/2025, 5:14:14 PM
Expires: never
I just generated it myself with command
because it wasnt part of the project
Looks all standard.
Can't spot anything bad.
I have been looking at various project all day and I havent seen anything similar
You really don't have any Policies?
where would they be stored?
app/Policies
no
I have Middleware
Unless you have something like a domain/modules/... setup
but thats for checking users
Sorry. I am out of ideas.
You can't talk to the person that created that demo?
not directly but I will just have to ask the project leader about it
it took almost 2 week to even get working login
I kept getting demos without files
but there is no way for resources to be stored like views rights?
in resources/views/filament
it is why I have been looking at various projects to see something similar but most just store it like in filament docs in app/
If there is I'll be surprised about the creativity 😅
if you find it out send me an update.
okay thanks for help
He just said to uncomment
which I had done already and now we both have no idea what to do
oh my god
it is solved
Solution
I had to do
I always run first 4 I never even knew about last one
Why do you cache your dev environment? 🙈
what do you mean
I dont know if I cache it
I just write code and do php artisan serve to launch project
I used to do only first 4 lines
php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan cache:clear
If have to clear it then at some point you cached it. FYI, optimize:clear runs all the other clears.
but adding this 5th line fixed it somehow I dont even know how myself because as I understand
php artisan optimize:clear
is just line to run first 4 lines
But filament does have a command to cache all the component views that taps into optimize:clear to clear the component cache.
But it doesn’t optimize/cache by default. So at some point in time it was cached in your local dev env.
I did change my env file to do this I think or maybe it is by default
CACHE_STORE=file
Not the end of the world, just some to be aware of for the future.
I had to change few things in env file to be just file instead of database because most of it is just not setup to be stored in db
I’ve even run into issues before where I had to delete the entire vendor folder and reinstall it. Sometimes it just happens for weird reasons.