Custom Group Label
I am working on a Laravel Filament project and I have a problem with grouping a resource by blood group. I have an array that maps blood group ids to blood group names, like this:
I store the blood group id as an integer in the database, but I want to display the blood group name in the resource. However, when I use the groups method, it shows the id instead of the name, like this:
For example, it shows "Blood group: 1" instead of "Blood group: A+". How can I fix this?
I store the blood group id as an integer in the database, but I want to display the blood group name in the resource. However, when I use the groups method, it shows the id instead of the name, like this:
For example, it shows "Blood group: 1" instead of "Blood group: A+". How can I fix this?

Solution
If you put them in a table, then you can use:
https://filamentphp.com/docs/3.x/tables/grouping#setting-a-grouping-label
Else, remove the interfers and just create string array of groups and ensure the users enter as a string and not a number.
https://filamentphp.com/docs/3.x/tables/grouping#setting-a-grouping-label
Else, remove the interfers and just create string array of groups and ensure the users enter as a string and not a number.