別のビューにログインしようとした人を認証に追加するにはどうすればよいですか?Laravelにログインする直前にリダイレクトする5.4
私はそれはまだ私はそれだけでログインする前に「/ AUTH /」ビューを表示するためにしようとしている、そしてそれはビューを示していますがAuthenticateUsers.php
public function login(Request $request)
{
$this->validateLogin($request);
// If the class is using the ThrottlesLogins trait, we can automatically throttle
// the login attempts for this application. We'll key this by the username and
// the IP address of the client making these requests into this application.
if ($this->hasTooManyLoginAttempts($request)) {
$this->fireLockoutEvent($request);
return $this->sendLockoutResponse($request);
}
if ($this->attemptLogin($request)) {
//return $this->sendLoginResponse($request);
return redirect('/auth/'.Auth::id());
}
// If the login attempt was unsuccessful we will increment the number of attempts
// to login and redirect the user back to the login form. Of course, when this
// user surpasses their maximum number of attempts they will get locked out.
$this->incrementLoginAttempts($request);
return $this->sendFailedLoginResponse($request);
}
でこれを試してみましたログ私の中であなたは、あなたのリダイレクトを設定し
あなたのルートから認証ミドルウェアを削除しようとしましたか? – Onix
私のルートには認証ミドルウェアがありません。 'Route :: get( '/ auth/{id}'、 'AuthController @ index'); ' –
あなたが最初にアクセスするルートを表示できますか? – Onix