title: Laravel How to update multiple records using request all
body: <p>How to update all records using <code>request-&gt;all()</code>, I have many columns to update.
  here is my code for create method which I am using to insert multiple new records which is working fine.</p>
  
  <pre><code>public function store(Request $request)
  {
      $teacher = new Teacher;
      $teacher::create($request-&gt;all());
      $teacher-&gt;save();
      return back()-&gt;with('message','Teacher Added Successfully!');
  }
  </code></pre>
  
  <p>here is what I tried but it's not working,</p>
  
  <pre><code>public function update(Request $request, Teacher $teacher)
  {
      $teachers=$request-&gt;all();
      $teacher-&gt;save();
      return back()-&gt;with('message','Record Successfully Updated!');
  }
  </code></pre>