How to use Updating JSON Columns in Laravel 5

Laravel 5.* introduces a simple syntax for lookups and updates based on the value of specific keys in your JSON columns. This operation is only supported on databases that support JSON columns.

When updating a JSON column, you should use -> this sign.

DB::table('tbl_order')
            ->where('order_id', 101)
            ->update(['options->enabled' => true]);

Leave a Reply

Your email address will not be published. Required fields are marked *