Multilingual field data is not saved

Hello.

I installed and configured this plugin: https://filamentphp.com/plugins/filament-spatie-translatable

Set up the model:
class Category extends Model { use HasFactory, HasTranslations; public $translatable = ['name'];

Configured Resource:
public static function form(Form $form): Form { return $form ->schema([ TextInput::make('name.en') ->required(), TextInput::make('name.es') ->required() ... public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('name.en') ->searchable() ->sortable(), TextColumn::make('name.es') ->searchable() ->sortable(),

When I create a new category I get the error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name.en' in 'where clause'
SELECT count(*) AS aggregate FROM categories WHERE name.en = ....

How to fix it?
Was this page helpful?