mavinoo / laravelBatch

insert batch and update batch in laravel
MIT License
571 stars 118 forks source link

Empty object to safeJson #106

Closed viest closed 8 months ago

viest commented 11 months ago
$userInstance = new User;

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

$index = 'id';

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