title: Trying to update a row in database via csv file
body: <p>Hello i am trying to update one single row in my database. However i am recieving the folling error:</p>
  
  <pre><code>SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list' 
  (SQL: update `template` set `0` = Module Bro where `template_id` = 0)
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>function csvfileupload(Request $req)
   {
  if ($req-&gt;hasFile('csvfile')) {
      $path = $req-&gt;file('csvfile')-&gt;getRealPath();
      $data = \Excel::load($path)-&gt;get();
  
      if ($data-&gt;count()) {
          foreach ($data as $key =&gt; $value) {
              $arr[] = ['title' =&gt; $value-&gt;title, 
                        'address' =&gt; $value-&gt;address,
                        'intro' =&gt; $value-&gt;intro,
                        'mainbody' =&gt; $value-&gt;mainbody,
                        'paragraph' =&gt; $value-&gt;paragraph,
                        'footer' =&gt; $value-&gt;footer,
  
                       ];
          }
          if (!empty($arr)) {
              DB::table('template')-&gt;where('template_id', 0)-&gt;update($arr);
  
              return "Success";
          }
      }
  }
  </code></pre>
  
  <p>What i am trying to achieve is to update the row in database which has the template id 0, any ideas?</p>