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
S
Sydd17d ago
Solved:
S
Sydd17d ago
TextEntry::make('roles.name') ->label(('app.role.roles')) ->badge() ->separator(',') ->formatStateUsing(fn (string $state): string => ("app.role.{$state}")),
Want results from more Discord servers?
Add your server
More Posts
Actions pop showing on server too large widthAction button clicks pop acttions view too large width. how to fix it? pls help on prodcution servModal View with RelationshipHello, I show the views in a modal instead of showing them on a separate page, the relationship dataTable summary not working for accessorsHello I try to build a summary for an accessor, which counts an amount of a hasMany relationship. `numeric() function casts represents number with comma and not with dotI don't know why but the numeric function casts somehow the dot notation to comma representation. MaCombining preloaded options and search results in Forms\Components\SelectGood day, everyone! I would like to improve user experience with choosing a client from a list in a Current model in RepeatableEntryHow do I get the current model in a RepeatableEntry so I can use it in url()?how can i add requiresConfirmation when creating recordsi have trid this ```php protected function getCreateFormAction(): Action { return ActionUploading new image to a prefilled spatie media file upload not working in custom page with formsI have a custom page with forms. I have multiple file inputs. The file inputs successfully shows theSelect::selectablePlaceholder(false) not working with relationshipsI have the following select component, which correctly displays as a list of the user's leads, with Select HasMany relationship with CreateOptionAccording to the docs the ability to create a new option on the fly only supports `BelongsTo` and `B