Translating a KeyValue field #104
Unanswered
grantholle
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a translatable
Laravel\Nova\Fields\KeyValuefield calledoptions. I can get it to work by doing some interesting things with a custom attribute for the model:However, the key order of the keys get changed (sorted) after saving it. When I change the
json_decodeto be an array in the setter, it saves the column with nested/recursive locales and tries to save the keys of that field as columns in the database.Here is the error that happens when trying to save, "Undefined column: 7 ERROR: column "either" of relation "form_fields" does not exist":
The order of
optionsis kind of important, but I can't figure out how to get it to work. I may not have a choice.Beta Was this translation helpful? Give feedback.
All reactions