Closed emresudo closed 1 week ago
Hey there,
While this may be a legitimate issue, can you first try posting your problem or question on one of the support channels below? If this issue can be definitively identified as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.
Thanks!
Laravel Version
11.31.0
PHP Version
8.3.10
Database Driver & Version
MySQL 8.4.3 for Docker
Description
There is JSON field update issue on project. I already added comment about problem in the controller.
If we are using json updating for data->language (with arrow), code generate built in json_set method. It is clever.
And I know other method is override old data column because we are actually providing an recursive array.
Of course we can do it something in this time, for example;
$table->json('data')->nullable();
-> Old$table->json('data')->default(new Expression('(JSON_ARRAY())'));
-> It doesn't work$table->json('data')->default(new Expression('(JSON_OBJECT())'));
-> It worksBut JSON field updating must be more consistent.
I will be add more details and solution when I have time.
Steps To Reproduce
Controller
App\Models\User