Laravel - Query Builder - Updating Json Columns

When updating a JSON column, you should use -> syntax to update the appropriate key in the JSON object. This operation is supported on MySQL 5.7+ and PostgreSQL 9.5+:

    
    $affected = DB::table('users')
                  ->where('id', 1)
                  ->update(['options->enabled' => true]);