得到了这个错误,但我怀疑这是我尝试拨打customers
后卫的方式。如何使用$this->auth
而不是我见过的所有Auth::guard
示例来调用它?
if ($this->auth::guard('customers')->attempt(['email' => $email, 'password' => $password], true) === false) {
return Redirect::back()
->with(['message' => 'Your username/password combination was incorrect', 'failed' => true])
->withInput();
}
答案 0 :(得分:2)
更改
$this->auth::guard('customers')
到
\Auth::guard('customers')
或
auth()->guard('customers')