Laravel 5.5 Eloquent JSON update is invalid

< H1 > references < / H1 >

https://laravel-china.org/top.

< H1 > question background < / H1 >

Larvale and MySQL versions:

Laravel 5.5
MySQL 5.7.22

migration: ext is in json format:

>>> $sample->update(["ext->hello"=>"nihao"]);

the database update does not take effect? What"s the problem with the gods?


has found the answer. Looks like a Laravel bug

similar questions:

https://laracasts.com/discuss.

Eloquent should be written as:

$sample->update(['ext.hello'=>'world2']);
Menu