I need to login users registered in the table Igrejas that have the fields responsavel_cpf and responsavel_senha, but Laravel in the function validateCredentials expects the name 'password'
.
public function validateCredentials(UserContract $user, array $credentials)
{
$plain = $credentials['password'];
}
I tried to login using attempt without success:
$userdata = array(
'responsavel_cpf' => Input::get('email'),
'responsavel_senha' => Input::get('password')
);
if (Auth::guard('igrejas')->attempt($userdata)) {
return Redirect::to('dashboard_paroquia');
} else {
return Redirect::to('login');
}
What do I do to replace the default fields email and password with responsavel_cpf and responsavel_senha?