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 Squadrons and the Squadrons belongsToMany Users - both withPivot('is_primary').
I am hoping to change the badge color based on the Boolean is_primary
  • I cannot for the life of me figure out how to get it to dynamically change based on the pivot Boolean.
houghts?
Was this page helpful?