[英]Laravel login limit with specific database record
我正在嘗試限制在數據庫中用戶表的功能行中具有“請求”的用戶登錄。
AuthenticatesUsers.php
protected function attemptLogin(Request $request)
{
return $this->guard()->attempt(
$this->credentials($request), $request->has('remember')
);
}
我將如何實現這一目標?
if (Auth::attempt([
'email' => $request->email,
'password' => $request->password,
'function' => 'Request'
])) {
//only users matching those 3 criteria will be logged in.
}
這是什么文件?
任何用戶登錄邏輯的控制器(UserController,LoginController,AuthController或其他任何你稱之為的控制器)。
除非您更改它,否則無法將其添加到默認登錄名。 這是自定義/手動驗證。
所以我不能用laravel的默認身份驗證來限制人們登錄?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.