1
我无法找到问题。它在哪里? “未定义的变量:要求”Laravel:未定义变量:请求
public function login()
{
// Validate the form data
$this->validate($request, [
'email' => 'required|email',
'passwort' => 'required|min:6'
]);
// Attempt to log the user in
if (Auth::guard('admin')->attempt(['email' => $request->email, 'passwort' => $request->passwort], $remember)) {
// if successful, then redirect to their intended location
return redirect()->intended(roue('admin.dashboard'));
}
// if unsuccessful, then redirect back to the login with the form data
return redirect()->back()->withInput($request->only('email', 'remember'));
}
好了,非常简单。您尚未定义'请求'变量,但您在代码中使用了它。 – zuif