public function verify(Request $request, EmailVerification $emailVerification)
    {
        $this->validateVerificationRequest($request);
        
        // Here we will attempt to verify the user. If it is successful we
        // will update the verified on an actual user model and persist it to the
        // database. Otherwise we will parse the error and return the response.
        $response = $emailVerification->verify(
            $request->only(
                'email', 'expiration', 'token'
            ), function ($user) {
            return $this->verifiedEmail($user);
        }
        );


        // If the user was successfully verified, we will redirect the user back to
        // the application's home authenticated view. If there is an error we can
        // redirect them back to where they came from with their error message.
        return $response == EmailVerification::VERIFIED
            ? $this->sendVerificationResponse($response)
            : $this->sendVerificationFailedResponse($request, $response);
    }
public function verify(Request $request, EmailVerification $emailVerification)
    {
        $this->validateVerificationRequest($request);
        
        // Here we will attempt to verify the user. If it is successful we
        // will update the verified on an actual user model and persist it to the
        // database. Otherwise we will parse the error and return the response.
        $response = $emailVerification->verify(
            $request->only(
                'email', 'expiration', 'token'
            ), function ($user) {
            return $this->verifiedEmail($user);
        }
        );


        // If the user was successfully verified, we will redirect the user back to
        // the application's home authenticated view. If there is an error we can
        // redirect them back to where they came from with their error message.
        return $response == EmailVerification::VERIFIED
            ? $this->sendVerificationResponse($response)
            : $this->sendVerificationFailedResponse($request, $response);
    }
public function verify ( Request $ request , EmailVerification $ emailVerification ) { $ this -> validateVerificationRequest ( $ request ) ; // Here we will attempt to verify the user. If it is successful we // will update the verified on an actual user model and persist it to the // database. Otherwise we will parse the error and return the response. $ response = $ emailVerification -> verify ( $ request -> only ( 'email' , 'expiration' , 'token' ) , function ( $ user ) { return $ this -> verifiedEmail ( $ user ) ; } ) ; // If the user was successfully verified, we will redirect the user back to // the application's home authenticated view. If there is an error we can // redirect them back to where they came from with their error message. return $ response == EmailVerification :: VERIFIED ? $ this -> sendVerificationResponse ( $ response ) : $ this -> sendVerificationFailedResponse ( $ request , $ response ) ; }
Verifies the given user's email.

@param \Illuminate\Http\Request|Request $request
@param EmailVerification $emailVerification
@return \Illuminate\Http\RedirectResponse
Verifies the given user s email .