F
Filament9mo ago
Sydd

TextEntry roles badge translations

Dear all, please advice me, how to translate roles in TextEntry badges ..., I'm try but, it's dont work, returned values as stored in DB. TextEntry::make(('app.role.roles')) ->label(('app.role.roles')) ->badge() ->color('primary') ->separator(','),
Solution:
Solved:
Jump to solution
2 Replies
Solution
Sydd
Sydd9mo ago
Solved:
Sydd
SyddOP9mo ago
TextEntry::make('roles.name') ->label(('app.role.roles')) ->badge() ->separator(',') ->formatStateUsing(fn (string $state): string => ("app.role.{$state}")),

Did you find this page helpful?