laravel update json code example
Example 1: Updating JSON Column in laravel
$affected = DB::table('users')
->where('id', 1)
->update(['options->enabled' => true]);
Example 2: laravel modify all json responses
this middleware would perform its task after the request is handled by the application: