© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
Flu

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:

StatusColumn::make(name: 'status')
                    ->state(state: function (EmployeeService $employeeService, Employee $record): string {
                        return $status = $employeeService->calculateStatus($record)->value;
                    })
StatusColumn::make(name: 'status')
                    ->state(state: function (EmployeeService $employeeService, Employee $record): string {
                        return $status = $employeeService->calculateStatus($record)->value;
                    })


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
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.
How to consume an external API with Filament Tables by Leandro Ferr...
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Custom UI Filter in table builder
FilamentFFilament / ❓┊help
3y ago
Computed table values
FilamentFFilament / ❓┊help
3y ago
error on table builder
FilamentFFilament / ❓┊help
3y ago
Table Builder
FilamentFFilament / ❓┊help
2y ago