Infolist Section Badge

I would really like to be able to have a badge in the header of an infolist section. Looking for suggestions. Should I just maybe make a custom action with a custom view and use the bade component? Wanting to do this in the cleanest way possible.
3 Replies
Kenneth Sese
Kenneth Sese2w ago
@Mark Chaney what about defining a view for the infolist section, copying the section blade file, but add in the headerEnd slot? Seems cleaner than a header action.
Mark Chaney
Mark ChaneyOP2w ago
what do you mean add it in? its there (the headerend slot), there just isnt a method for defining what goes there or am i not following you
Kenneth Sese
Kenneth Sese2w ago
Filament's support section component renders the headerEnd slot, but the infolist section blade view doesn't include it. So you'd have to override the infolist section with a custom view, copying and pasting the existing infolist section but adding in the headerEnd slot. You should be able to pass in whatever you want into the data property of the view method to get the badge. Look at the chart-widget.blade.php to see how they're using the headerEnd slot and passing in data

Did you find this page helpful?