This is code here:
protected function credentials(Request $request)
{
$admin=admin::where('email',$request->email)->first();
if(count($admin))
{
if($admin->status==0){
return ['email'=>'inactive','password'=>'You are not an active person, Please contact to admin'];
}
else{
return ['email'=>$request->email,'password'=>$request->password,'status'=>1];
}
}
return $request->only($this->username(), 'password');
}
When i run the code this error become:
"count(): Parameter must be an array or an object that implements Countable"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…