src/Http/Controllers/Tenantarea/EmailVerificationController.php
public function verify(EmailVerificationProcessRequest $request)
    {
        $result = app('rinvex.auth.emailverification')
            ->broker($this->getEmailVerificationBroker())
            ->verify($request->only(['email', 'expiration', 'token']), function ($user) {
                $user->fill([
                    'email_verified_at' => now(),
                ])->forceSave();
            });

        switch ($result) {
            case EmailVerificationBrokerContract::EMAIL_VERIFIED:
                return intend([
                    'url' => route('tenantarea.account.settings'),
                    'with' => ['success' => trans('cortex/auth::'.$result)],
                ]);

            case EmailVerificationBrokerContract::INVALID_USER:
            case EmailVerificationBrokerContract::INVALID_TOKEN:
            case EmailVerificationBrokerContract::EXPIRED_TOKEN:
            default:
                return intend([
                    'url' => route('tenantarea.verification.email.request'),
                    'withInput' => $request->only(['email']),
                    'withErrors' => ['email' => trans('cortex/auth::'.$result)],
                ]);
        }
    }
public function verify(EmailVerificationProcessRequest $request)
    {
        $result = app('rinvex.auth.emailverification')
            ->broker($this->getEmailVerificationBroker())
            ->verify($request->only(['email', 'expiration', 'token']), function ($user) {
                $user->fill([
                    'email_verified_at' => now(),
                ])->forceSave();
            });

        switch ($result) {
            case EmailVerificationBrokerContract::EMAIL_VERIFIED:
                return intend([
                    'url' => route('tenantarea.account.settings'),
                    'with' => ['success' => trans('cortex/auth::'.$result)],
                ]);

            case EmailVerificationBrokerContract::INVALID_USER:
            case EmailVerificationBrokerContract::INVALID_TOKEN:
            case EmailVerificationBrokerContract::EXPIRED_TOKEN:
            default:
                return intend([
                    'url' => route('tenantarea.verification.email.request'),
                    'withInput' => $request->only(['email']),
                    'withErrors' => ['email' => trans('cortex/auth::'.$result)],
                ]);
        }
    }
public function verify ( EmailVerificationProcessRequest $ request ) { $ result = app ( 'rinvex.auth.emailverification' ) -> broker ( $ this -> getEmailVerificationBroker ( ) ) -> verify ( $ request -> only ( [ 'email' , 'expiration' , 'token' ] ) , function ( $ user ) { $ user -> fill ( [ 'email_verified_at' => now ( ) , ] ) -> forceSave ( ) ; } ) ; switch ( $ result ) { case EmailVerificationBrokerContract :: EMAIL_VERIFIED : return intend ( [ 'url' => route ( 'tenantarea.account.settings' ) , 'with' => [ 'success' => trans ( 'cortex/auth::' . $ result ) ] , ] ) ; case EmailVerificationBrokerContract :: INVALID_USER : case EmailVerificationBrokerContract :: INVALID_TOKEN : case EmailVerificationBrokerContract :: EXPIRED_TOKEN : default : return intend ( [ 'url' => route ( 'tenantarea.verification.email.request' ) , 'withInput' => $ request -> only ( [ 'email' ] ) , 'withErrors' => [ 'email' => trans ( 'cortex/auth::' . $ result ) ] , ] ) ; } }
Process the email verification.

@param \Cortex\Auth\B2B2C2\Http\Requests\Tenantarea\EmailVerificationProcessRequest $request

@return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
Process the email verification .