[13.x] Fix updating JSON paths with arrays and collections on MySQL and MariaDB
Merged
XU
8d ago+58+58+01234567890123456789-2-2-0123456789
Updating a JSON path with an array fails on MariaDB, and with a collection it's saved as a string on MySQL and MariaDB:
DB::table('users')->update(['settings->tags' => ['laravel', 'php']]);
// MariaDB: 1064 ... near 'json))'
DB::table('users')->update(['settings->tags' => collect(['laravel', 'php'])]);
// {"tags": "[\"laravel\",\"php\"]"}