I have 3 content tabs on the top of my edit form, they are visible after adding
hasCombinedRelationManagerTabsWithContent()
hasCombinedRelationManagerTabsWithContent()
to my EditUser class.
My question is, can I add a badge to these tabs? I see that badges can be added to other types of tabs, but how would one go about adding a badge to content tabs?
My use case is, I'd like to add the number of debts and number of payments as badges.
Solution
A relation manager can have badges too yes, even if combined
protected static ?string $badge = 'NEW';//or public static function getBadge(Model $ownerRecord, string $pageClass): ?string{ return 100; // return $ownerRecord->details->count(); // return $ownerRecord->debts->count();}// or whatever
protected static ?string $badge = 'NEW';//or public static function getBadge(Model $ownerRecord, string $pageClass): ?string{ return 100; // return $ownerRecord->details->count(); // return $ownerRecord->debts->count();}// or whatever