title: How to update the updated_at column when the user logs in?
body: <p>I'm trying to update the <code>updated_at</code> column to the current time, each time a user logs in.</p>
  
  <p>But I get the following error:</p>
  
  <blockquote>
    <p>InvalidArgumentException A four digit year could not be found Data missing</p>
  </blockquote>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$input = Input::all();
  $remember = (Input::has('remember')) ? true : false;
  
  $auth = Auth::attempt([
      'username' =&gt; $input['username'],
      'password' =&gt; $input['password'],
      'active' =&gt; 1
      ],$remember
  );
  
  if ($auth) 
  {
      $user = Auth::user();
      $user-&gt;updated_at = DB::raw('NOW()');
      $user-&gt;save();
  
      if ($user-&gt;userType==1) 
      {
          return Redirect::intended('admin');
      }
      elseif ($user-&gt;userType==2)
      {
          return Redirect::intended('corporate');
      }
      elseif ($user-&gt;userType==3) 
      {
          return Redirect::intended('trainer');
      }
      elseif ($user-&gt;userType==4) 
      {
          return Redirect::intended('user');
      }
  }
  </code></pre>