title: Call to a member function save() on integer
body: <p>I'm trying to do a simple save but I get this error.</p>
  
  <blockquote>
    <p>Call to a member function save() on integer</p>
  </blockquote>
  
  <p>Here is my code from controller:</p>
  
  <pre><code>foreach ($request['array'] as $key =&gt; $value) {
  
      if(DB::table('users')-&gt;where('id',$value)-&gt;where('auth',0)-&gt;exists() == true){
          $c = DB::table('users')-&gt;where('id', $value);
          $c-&gt;auth_teacher = '1';
          $c-&gt;update();
      }
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Made changes now I get this: </p>
  
  <blockquote>
    <p>update() must be of the type array, none given</p>
  </blockquote>