Computed Property Filter On Table Builder?
Hey, I'm using Filament Tables outside of Filament just to quickly bootstrap an app
I'm using a service and calling a method that returns an enum of strings, this shows fine in my table:
it's a computed property with a few nested many to many relationships and calculations to get the value
I'm trying to workout how I can add a filter for this property, does anyone have any examples or suggestions? It's not stored in the DB and has to be computed
Solution:Jump to solution
Update:
I ended up wrapping it into a DTO as I needed to anyway and then using a Data Collection for my data using Sushi: https://filamentphp.com/community/how-to-consume-an-external-api-with-filament-tables...
Filament
How to consume an external API with Filament Tables by Leandro Ferr...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
3 Replies
I don’t think there’s a way to search on that. The search depends on an eloquent query. So it would have to at least be a virtual column on the table.
yeah I thought as much, thank you
Solution
Update:
I ended up wrapping it into a DTO as I needed to anyway and then using a Data Collection for my data using Sushi: https://filamentphp.com/community/how-to-consume-an-external-api-with-filament-tables
Filament
How to consume an external API with Filament Tables by Leandro Ferr...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.