laravelBatch icon indicating copy to clipboard operation
laravelBatch copied to clipboard

Empty object to safeJson

Open viest opened this issue 1 year ago • 0 comments
trafficstars

$userInstance = new User;

$value = [
     [
         'id' => 1,
         'json' => '{}'
     ] ,
     [
         'id' => 5,
         'json' => '{"key":"values"}'
     ] ,
];

$index = 'id';

Batch::update($userInstance, $value, $index);

viest avatar Nov 24 '23 13:11 viest