Answer the question
In order to leave comments, you need to log in
How to store json data in database?
And again, hello everyone! )
I'm not saving json data correctly. I don't know how to do it right... Tell me who knows.
I have an elements field with json data .
It is required to update the parameter . I update
...{"param": {"0": "0"}}
Section::where([
"id" => 1
])->update([
"elements->param" => json_encode(["TEST" => "TEST"])
]);
{"param": "{\"TEST\":\"TEST\"}"}
{"param": {"TEST": "TEST"}}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question