Search code examples
laraveltranslationlaravel-filament

spatie v3 filament translatable - livewire activeLocale error


Ive a fresh laravel 10.10 install, with filament 3.2 and the spatie laravel translatable prugin 3.2.

Ive setup a model with two tranlatable fields an the resource in filament. The language Switcher Action is set and the Trait importet. Everything like described in the Docs.

No whenever i load the resource create, edit or update page ive a console error:

livewire.js?id=a27c4ca2:9378 Livewire: [wire:model="activeLocale"] property does not exist on component: [app.filament.resources.hero-slide-resource.pages.edit-hero-slide]

The switcher makes an ajax call, everthing is saved correctly in the db, but the two text input fields that are translatable it shows [object Object] instead of the tranalated value.

After searching for two days now i really hope someone has an idea how to fix this?


Solution

  • Add this use ManageRecords\Concerns\Translatable; on top of php file, refence to code.