Back then it was only possible if Laravel is setup with MySql. I am wondering if MariaDB could be used today with laravels support for json column type.
I found these and it makes me think it should work today but I do not have direct experience with using laravel with where() and update() on json column type and I am considering implementing this in my application, however I want my application's user to be able to use either mysql or mariadb so I need to decide if I want to use these features or not
10.2 of MariaDB is stable and should be available for people to upgrade to (if they aren't using it already).
JSON wheres are cool but if you just store it as JSON then use a Laravel $cast property, you can explode the JSON into an array when you access the attribute on the rows.
@maxnb Yes. that works. It uses standard JSON_SET() function, so it works without my package also.
Solution was simple. I just translated "column->path" alias back to JSON_EXTRACT and that's mostly all. There were some dirty hacks to make "table.field->json" work.
@bashy Vice verca . It work only on later (or the latest) versions on MariaDB. And by the way also with MySQL 5.7 and up
MariaDB stores JSON as true text, not in binary format as MySQL. The reason is that our JSON functions are much faster than MySQL's so we didn't need to see a need for storing things in binary format as it adds a lot of complexity when manipulating JSON objects.
For the same reason, MariaDB's JSON data type is an alias for LONGTEXT.