Set text on the badge according to the value
I have this badge that takes from id_topic the topic number on the forum where comments are open.
If id_topic is 0 then comments are closed, if it contains an id above 0 then comments are open.
I have tried this, but inside the badge it always returns me the id of id_topic and not the words "open" or "close"
If id_topic is 0 then comments are closed, if it contains an id above 0 then comments are open.
I have tried this, but inside the badge it always returns me the id of id_topic and not the words "open" or "close"
Solution
That's why, you need formatStateUsing not badge:
https://filamentphp.com/docs/2.x/tables/columns/text#custom-formatting
https://filamentphp.com/docs/2.x/tables/columns/text#custom-formatting