Akimbo
In resources, where do I put database queries that I only want to run once?
That's a fine answer, but it brings a completely different set of problems that using a Cache brings. Caching should not be the go to for a problem with the frameworks lifecycle.
Like you say, I'd expect a supplied closure to run once per row, but that's not the case with
->hidden()
. Running it 5 times per row seems unnecessary. It doesn't get new parameters between each call.
I will mark Mohamed's answer for now because I don't see downsides to it, but it'd be nice to see Filament have more control over stuff like this in the future.10 replies
In resources, where do I put database queries that I only want to run once?
And the reason this is also an issue for me is I can't get spatie laravel-permissions to actually use the cache. It uses it when getting all permissions but the
can
and hasPermissionTo
queries don't seem to leverage the cache10 replies
Can't add scripts to admin panel service provider
I'm realizing what happened.
They had imports at the top, so filament was trying to load them and ran into an error.
Laravel breeze sets up Vite to compile these with babel, but filament obviously doesn't do that.
31 replies
Can't add scripts to admin panel service provider
Maybe there's something funky. Just seems like the filament:assets command is moving the file but nothing is doing the automatic import.
Maybe this is a difference between how Breeze now sets up Volt apps and what Filament expects the structure to be
31 replies