How to increase update volume in laravel 4

Hi, I was wondering how can I do a bulk update in laravel 4, and not a loop and update in pieces?

I know the volume insert is like this:

$invoiceitem->insert($items_array); 
+6
source share
1 answer

You can use the eloquent.

 Model::whereIn($items_array)->update(array('Foo' => 'Bar')); 
+12
source

Source: https://habr.com/ru/post/969882/


All Articles