Spatie Translatable Plugin and relationship fieldset
My
In my
This works just fine. Until i add the Spatie Translatable Plugin.
I found out adding the relationship name to the translatable array on the page model made the language selector "work" on the related textInputs:
Now when i switch languages using the LocaleSwitcher on the create or edit screen, the inputs seem to store the data per language.
When i enter just 1 language, no issue, but when i set multiple language variables and save it, i get an error
Now all of a sudden the
the raw query is:
Any ideas would be welcome
Page model has a MorphOne relationship to the Seo model. The Seo model has columns like title and description.In my
PageResource i have a fieldset for the Seo relationship:This works just fine. Until i add the Spatie Translatable Plugin.
I found out adding the relationship name to the translatable array on the page model made the language selector "work" on the related textInputs:
public array $translatable = ['title', 'seo'];Now when i switch languages using the LocaleSwitcher on the create or edit screen, the inputs seem to store the data per language.
When i enter just 1 language, no issue, but when i set multiple language variables and save it, i get an error
Now all of a sudden the
seo isn't stored as a relationship but as a column on the page model.the raw query is:
update pages set title = ?, seo = ?, pages.updated_at = ? where id = ? Any ideas would be welcome