© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
8 replies
Greg

Arbitrary values for table column

I've got a Resource component that maps to Auditions in my app. An Audition HasMany Dates which also HasMany Slots and those Slots have a user_id to indicate whether anyone has signed up for them. I want to add a column that displays the count of "sign ups" - slots with a non-null user_id.

I've used ->counts for another column but I don't think the same syntax works for a 2nd order relation along with a condition.

Starting from $this representing the Audition model, I can easily create the value I want to display but I don't know how to incorporate arbitrary code in the TableBuilder. Is that possible?

Thank you!
Solution
I'm not sure whether you're trying to display this new calculation next to Auditions, or next to Dates.
But I would expect using dot-notation and a whereNotNull() query clause would be the direction to go
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Table Column
FilamentFFilament / ❓┊help
3y ago
Table column
FilamentFFilament / ❓┊help
3y ago
HintIcon for table header column
FilamentFFilament / ❓┊help
2y ago
Table Column for json value
FilamentFFilament / ❓┊help
3y ago