Hi I was wondering how I can do a bulk update in laravel 4 rather then looping and updating in chunks?
I know bulk insert is like this:
$invoiceitem->insert($items_array);
Hi I was wondering how I can do a bulk update in laravel 4 rather then looping and updating in chunks?
I know bulk insert is like this:
$invoiceitem->insert($items_array);
You could use eloquent.
Model::whereIn($items_array)->update(array('Foo' => 'Bar'));
Bulk update is easy by installing a simple package
https://github.com/rajmn/batchquery-package
Update multiple column in a table by a specific conditions also insert multiple row at a time