title: Laravel update only single row
body: <p>I am having a trouble updating my single record in database with laravel.</p>
  
  <p>When i run this method and give requestparams only "name" then the other fields are going to be blank in database.
  How to keep the values that are not specified in the requestparams?.</p>
  
  <pre><code>public function update(Request $request, $id)
  {
      $user = User::find($id);
      if(!is_null($user)){
          $user-&gt;name = $request-&gt;input('name');
          $user-&gt;email = $request-&gt;input('email');
          $user-&gt;password = $request-&gt;input('password');
          $user-&gt;save();
      }else{
          $data = array('msg' =&gt; 'The user, you want to update, does not exist', 'error' =&gt; true);
          echo json_encode($data);
      }
  }
  </code></pre>