2
我的身份驗證嘗試時,用戶登錄不工作作爲expected.It總是會返回其他部分想嘗試AUTH驗證::嘗試不工作的登錄
public function tunneluserAuth(Request $request)
{
$this->validate($request, [
'email' => 'required|email',
'password' => 'required',
]);
$password=Hash::make($request->input('password'));
if (Auth::attempt(array('userLogin' => $request->input('email'),
'userPassword' => $password))) {
echo "hi";exit;
}
else {
echo "here";exit;
}
}
時,我的auth.php頁面就像是,
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Entity\User::class,
],
'companyUsers' => [
'driver' => 'database',
'table' => 'companyUsers',
],
],
但它總是返回else condition.why?