Using Spatie Translatable

I'm using the following official pluging https://filamentphp.com/plugins/filament-spatie-translatable and everything works fine except. (See the image attachment) And my code for this looks like:
Forms\Components\Select::make('city_id')
->relationship('city', 'name')
->label('City')
->required(),
Forms\Components\Select::make('city_id')
->relationship('city', 'name')
->label('City')
->required(),
Filament
Spatie Translatable by Filament - Filament
Filament support for Spatie's Laravel Translatable package.
No description
4 Replies
LeandroFerreira
LeandroFerreira10mo ago
->relationship('city', fn (Component $livewire): string => 'name->'.$livewire->activeLocale)
->relationship('city', fn (Component $livewire): string => 'name->'.$livewire->activeLocale)
Martin Bojmaliev
Martin BojmalievOP10mo ago
Oh ok, but shouldn’t work this out of the box?
LeandroFerreira
LeandroFerreira10mo ago
no
Martin Bojmaliev
Martin BojmalievOP10mo ago
Thank you And what if the the field has missing locale for the activeLocale ? It throws and error :/
Want results from more Discord servers?
Add your server