Je ne trouve pas le problème. Où est-ce? "Undefined variable: demande"Laravel: Variable indéfinie: demande
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'));
}
Eh bien, assez simple. Vous n'avez pas défini la variable 'request' mais vous l'utilisez dans votre code. – zuif