how to translate the option in a Select?
I tried : ->options((WebsiteType::all()->pluck( ('name')), 'id')), but doesn't work.
4 Replies
Where are your translations? In a translation file? Please format your code properly ( #✅┊rules )
in json file, in lang directory
I tried also: ->getOptionLabelFromRecordUsing() but works only with relationship(), but I need options()
Solution
You need to
->map()
your names to the translated names.ty