title: Laravel model: update only one field
body: <p>I have validation rules for my model:</p>
  
  <pre><code>protected $fillable = array('username','firstname','lastname',"street","city","country","birthday","email");
  
  public static $rules = array(
      'username' =&gt; 'required|between:4,16|unique:users',
      'email' =&gt; 'required|email|unique:users',
      'password' =&gt; 'required|min:4',
      'firstname' =&gt; 'required|alpha_num|between:2,16',
      'lastname' =&gt; 'required|alpha_num|between:2,32',
  );
  </code></pre>
  
  <p>and my update method:</p>
  
  <pre><code>public function update($id)
  {
      $user = User::find($id);        
      $data = Input::all();       
      if ( isset($data['firstname']) ) {
          $user-&gt;firstname = $data['firstname'];
      }
  
      $success = $user-&gt;update();
  
      if ( $success ) {
          return Response::json(array('error' =&gt; false, 'user' =&gt; $user-&gt;toArray()), 200 );
      } else {
          return Response::json(array('error' =&gt; true, 'message' =&gt; $user-&gt;errors()-&gt;all()), 400 );   
      }
  }
  </code></pre>
  
  <p>And now I'm getting an error:</p>
  
  <pre><code> {
      "error": true,
      "message": [
          "The username has already been taken.",
          "The email has already been taken."
      ]
  }
  </code></pre>
  
  <p>So, the question is: How can I update only one field of the model?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>As I'm using Ardent (<a href="https://github.com/laravelbook/ardent" rel="nofollow">https://github.com/laravelbook/ardent</a>) I could do:</p>
  
  <pre><code>$success = $user-&gt;updateUniques();
  </code></pre>
  
  <p>and everything works now.</p>