Enable component caching

Hello everybody. Guys, I'm trying to cache Filament components, but I'm getting this error, could you please guide me. The Filament folder within the Cache already exists.
No description
5 Replies
joao nivaldo
joao nivaldoOP10mo ago
If anyone knows how I can solve this I would really appreciate it.
Saade
Saade10mo ago
I know what is wrong. Go to the file (yes in the vendor directory just to test if it works): vendor/filament/src/Panel/Concerns/HasComponents at line 674 And replace the line 674 line with: return (config('filament.cache_path') ?? base_path('bootstrap/cache/filament')) . DIRECTORY_SEPARATOR . "panels". DIRECTORY_SEPARATOR . "{$this->getId()}.php"; run the command again and see if it works
joao nivaldo
joao nivaldoOP10mo ago
But it is not right to touch the file within Vendor. Is there another way? Thanks
Saade
Saade10mo ago
It was just a test to see if that was the problem. https://github.com/filamentphp/filament/pull/11516
joao nivaldo
joao nivaldoOP10mo ago
So it's because of Windows. If I do Linux, will it be ok? I'm actually testing on Windows but then it will go to production and it's Linux. So it's better to leave it like this. Thanks
Want results from more Discord servers?
Add your server