I am stuck with Auth::attempt
for an api.
UserController.php
$credentials = ['user_email' => $data['email'],'user_password' => md5($data['password'])];
if (Auth::attempt($credentials)) {
return Redirect::route("user/profile");
}
User.php
<?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->getKey();
}
public function getAuthPassword()
{
return $this->user_password;
}
public function getReminderEmail()
{
return $this->user_email;
}
}
auth.php
return array(
'driver' => 'eloquent',
'model' => 'User',
'table' => '',
'reminder' => array(
'email' => 'emails.auth.reminder',
'table' => 'password_reminders',
'expire' => 60,
),
);
error message
Its returning ErrorException since I am using RESTClient to test the api I can't debug easily the errors. Can somebody please help me.