title: how to update column of table by each element of array one by one?
body: <p>I want to update table's column</p>
  <pre><code>$update = DB::table('users')-&gt;where('latehours' , '');
  
  foreach($update as $up) {
      $up-&gt;update([
          'latehours' =&gt; $total_hours
      ]);
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/WNY8T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WNY8T.png" alt="enter image description here" /></a></p>