title: Laravel Auth::attempt
body: <p>I am stuck with <code>Auth::attempt</code> for an api.</p>
  
  <h3>UserController.php</h3>
  
  <pre><code>$credentials = ['user_email' =&gt; $data['email'],'user_password' =&gt; md5($data['password'])];
  if (Auth::attempt($credentials)) {
      return Redirect::route("user/profile");
  }
  </code></pre>
  
  <h3>User.php</h3>
  
  <pre><code>&lt;?php
  
  use Illuminate\Auth\UserInterface;
  use Illuminate\Auth\Reminders\RemindableInterface;
  
  class User extends Eloquent implements UserInterface, RemindableInterface{
  
      public $timestamps = false;
      protected $table = 'ofalt_users';
          protected $hidden = array('password');
      protected $primaryKey = 'user_id';
  
      public function getAuthIdentifier()
      {
          return $this-&gt;getKey();
      }
      public function getAuthPassword()
      {
          return $this-&gt;user_password;
      }
      public function getReminderEmail()
      {
          return $this-&gt;user_email;
      }
  
  }
  </code></pre>
  
  <h3>auth.php</h3>
  
  <pre><code>return array(
  'driver' =&gt; 'eloquent',
  'model' =&gt; 'User',
  'table' =&gt; '',
  'reminder' =&gt; array(
      'email' =&gt; 'emails.auth.reminder',
      'table' =&gt; 'password_reminders',
      'expire' =&gt; 60,
      ),
  );
  </code></pre>
  
  <h3>error message</h3>
  
  <p>Its returning ErrorException since I am using RESTClient to test the api I can't debug easily the errors. Can somebody please help me.</p>