Laravel无法使用自定义表名和字段登录

时间:2018-12-17 13:40:50

标签: laravel authentication

我正在尝试使用名为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。字段还可以,我已经尝试了多次。

谢谢。

0 个答案:

没有答案
相关问题