No styling on filament + Tenancy for Laravel
Hello,
For some reason im not getting any styling when I head over to
domain/admin
. The network tab (chrome dev tools) is not throwing any loading errors yet no styling seems to be there. I do get a couple of errors in the console.Solution:Jump to solution
assuming you're using tenancyforlaravel.com
from the docs
"You can disable tenancy of asset() in the config (tenancy.filesystem.asset_helper_tenancy)"...
9 Replies
the errors are coz the files are not loaded
have you run
npm run build
?I have yes unfortunately, was hoping that would have fixed it, did not though
My vite config, if it makes any difference:
ummm, check the folder
`public/js and css
files do exist?
long shot, but sometimes the browser block these files, but I am using 'brave'
did you create custom theme?
recheck the docs, maybe messed a step!I only installed it, no custom theme or anything, literal first time using filament haha
It seems that theres something the Tenancy for Laravel package is doing, doesnt seem anything to do with Filament
Delving deeping in to the code for the Tenancy package now to figure it out, will mark an answer if i figure it out for the next guy (or elaborate more on my findings) π
there is an article about how to integrate it with filament but not published yet
https://github.com/filamentphp/filamentphp.com/pull/219/files
also I rembmer disable assets per tenent in the config solve some of the assets isseus
GitHub
filament integration with Tenancywithlaravel Full Guide Article by...
a step by step guide which will take your application from single user to multi-tenant application
thank you for that! I've looked it over, doesnt seem relevant to my issue unfortunately..
It seems that the filament assets are forced to be loaded through a tenancy route. Im trying to figure out WHY (it seems tenancy is currently hijacking the assets() helper or something) and where it's expecting those files to be now/how to override it to not include filament in that
Solution
assuming you're using tenancyforlaravel.com
from the docs
"You can disable tenancy of asset() in the config (tenancy.filesystem.asset_helper_tenancy)"
Oh haha, wish I read the 30 min ago π₯²
Ye thats exactly it, it seems they override it for tenant specific assets, which you can easily disable with that config parameter π₯²
Worked for me as well!