© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
99 replies
Schilly

Text Column Badge Color based on Pivot attribute

Hello,

I am trying to define a badge color based on the value of a pivot attribute.

For example:

- User
belongsToMany
belongsToMany
Squadrons and the Squadrons
belongsToMany
belongsToMany
Users - both
withPivot('is_primary')
withPivot('is_primary')
.

I am hoping to change the badge color based on the Boolean
is_primary
is_primary
- I cannot for the life of me figure out how to get it to dynamically change based on the pivot Boolean.


Thoughts?
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
Next page

Similar Threads

How to set custom badge color based on color picker.
FilamentFFilament / ❓┊help
2y ago
CUSTOM COLOR ON BADGE
FilamentFFilament / ❓┊help
2y ago
Show attribute on Column
FilamentFFilament / ❓┊help
3y ago
Use a badge text column in ->form?
FilamentFFilament / ❓┊help
2y ago