我正在尝试使用名为utilisateurs
的自定义表(使用字段courriel
作为用户名和motdepasse
作为密码)登录laravel。
if(Auth::attempt(['courriel' => $request->courriel, 'motdepasse' => $request->motdepasse]))
{
return redirect()->intended('/dashboard');
}
return redirect('/')->with(['error' => 'Impossible de se connecter avec ces identifiants']);
Auth:attempt()始终返回false。字段还可以,我已经尝试了多次。
谢谢。