title: Laravel 4 - Auth::attempt() not working
body: <p>I've been searching everywhere, but cannot figure out why my Auth::attempt() keeps failing. Please help me out.</p>
  
  <p><strong>This is my form:</strong></p>
  
  <pre><code>&lt;h2&gt;Admin Login&lt;/h2&gt;
  &lt;form method="post" action="&lt;?php echo url('login-process') ?&gt;"&gt;
      Username: &lt;input type="text" name="username" /&gt; &lt;br/&gt;
      Password: &lt;input type="password" name="password" /&gt;
      &lt;button type="submit"&gt;Login&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>This is my login function:</strong></p>
  
  <pre><code>$username = Input::get('username');
  $password = Input::get('password');
  
  if (Auth::attempt(array('username' =&gt; $username, 'password' =&gt; $password))) {
  
          echo "success!"; //just for testing purposes
  } else {
          echo "fail!";
  </code></pre>
  
  <p><strong>My User.php is the default one. looks like this:</strong>
      
  
  <pre><code>use Illuminate\Auth\UserInterface;
  use Illuminate\Auth\Reminders\RemindableInterface;
  
  class User extends Eloquent implements UserInterface, RemindableInterface {
  
  
  /**
   * The database table used by the model.
   *
   * @var string
   */
  protected $table = 'users';
  
  /**
   * The attributes excluded from the model's JSON form.
   *
   * @var array
   */
  protected $hidden = array('password');
  
  /**
   * Get the unique identifier for the user.
   *
   * @return mixed
   */
  public function getAuthIdentifier()
  {
      return $this-&gt;getKey();
  }
  
  /**
   * Get the password for the user.
   *
   * @return string
   */
  public function getAuthPassword()
  {
      return $this-&gt;password;
  }
  
  /**
   * Get the e-mail address where password reminders are sent.
   *
   * @return string
   */
  public function getReminderEmail()
  {
      return $this-&gt;email;
  }
  
  }
  </code></pre>
  
  <p><strong>And this is how I save the new user information (using Eloquent):</strong></p>
  
  <pre><code>$user = new User();
  $user-&gt;username = Input::get('username');
  $user-&gt;email = Input::get('email');
  $user-&gt;password = Hash::make(Input::get('password'));
  $user-&gt;save();
  </code></pre>
  
  <p>But I keep getting fail when user logs in with correct credentials. Been working on this for a few days now, and can't help but feel that I'm missing something trivial. Lend a hand please? Thanks!</p>