Attempt to login in Laravel with custom data: num Id, TipoId, password Auth, but I always returns false, not to be configured to accept different data to email and password:
$tipoId=Input::get('tipoId');
$numId=input::get('numId');
$password=Input::get('password');
$userdata = array('tipoId' => Input::get('tipoId'), 'numId' => Input::get('numId'), 'password' => Input::get('password') );
if (Auth::attempt($userdata)) {
}else{
return $userdata;
}
Model
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class Login extends Eloquent implements UserInterface, RemindableInterface{
use UserTrait, RemindableTrait;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'Logins';
}
Auth.php
return array(
'driver' => 'eloquent',
'model' => 'Login',
'table' => 'Logins',
'reminder' => array(
'email' => 'emails.auth.reminder',
'table' => 'password_reminders',
'expire' => 60,
),
Does not leave me any error but every time I try to login, I always returns false, not this doing wrong?
Hash::make()? - lukasgeiter