title: Update in bulk - Laravel
body: <p>I am trying to find someway to update multiple records at once like we have <code>insert</code> for creating multiple records at once.</p>
  
  <p>Lets say I have an associated array which contains data to be updated in each row of a table employees:</p>
  
  <pre><code>$data = [
    ['id'=&gt;1,'name'=&gt;'xxx'],
    ['id'=&gt;2,'name'=&gt;'xxx'],
    ['id'=&gt;3,'name'=&gt;'xxx'],
    ['id'=&gt;4,'name'=&gt;'xxx']
  ];
  </code></pre>
  
  <p>One way of updating all these records is:</p>
  
  <pre><code>foreach($data as $d){
     Employee::where('id'=&gt;$d['id'])-&gt;update(['name'=&gt;$d['name']]);
  }
  </code></pre>
  
  <p>where Employee is model for employees table ofocurse.</p>
  
  <p>I am wondering if i can update all records by one line statement?</p>
  
  <p>For instance if I had create new records from $data, I would use:</p>
  
  <pre><code>Employee::insert($data);
  </code></pre>
  
  <p>instead of looping through $data and use create() for each record.</p>
  
  <p>Anything like that exists for updation as well?</p>