public function showVerification()
    {
        if (!config('laravel2step.laravel2stepEnabled')) {
            abort(404);
        }

        $twoStepAuth = $this->_twoStepAuth;
        $authStatus = $this->_authStatus;

        if ($this->checkExceededTime($twoStepAuth->updated_at)) {
            $this->resetExceededTime($twoStepAuth);
        }

        $data = [
            'user'              => $this->_user,
            'remainingAttempts' => $this->_remainingAttempts + 1,
        ];

        if ($this->_authCount > config('laravel2step.laravel2stepExceededCount')) {
            $exceededTimeDetails = $this->exceededTimeParser($twoStepAuth->updated_at);

            $data['timeUntilUnlock'] = $exceededTimeDetails['tomorrow'];
            $data['timeCountdownUnlock'] = $exceededTimeDetails['remaining'];

            return View('laravel2step::twostep.exceeded')->with($data);
        }

        $now = new Carbon();
        $sentTimestamp = $twoStepAuth->requestDate;

        if (!$twoStepAuth->authCode) {
            $twoStepAuth->authCode = $this->generateCode();
            $twoStepAuth->save();
        }

        if (!$sentTimestamp) {
            $this->sendVerificationCodeNotification($twoStepAuth);
        } else {
            $timeBuffer = config('laravel2step.laravel2stepTimeResetBufferSeconds');
            $timeAllowedToSendCode = $sentTimestamp->addSeconds($timeBuffer);
            if ($now->gt($timeAllowedToSendCode)) {
                $this->sendVerificationCodeNotification($twoStepAuth);
                $twoStepAuth->requestDate = new Carbon();
                $twoStepAuth->save();
            }
        }

        return View('laravel2step::twostep.verification')->with($data);
    }
public function showVerification()
    {
        if (!config('laravel2step.laravel2stepEnabled')) {
            abort(404);
        }

        $twoStepAuth = $this->_twoStepAuth;
        $authStatus = $this->_authStatus;

        if ($this->checkExceededTime($twoStepAuth->updated_at)) {
            $this->resetExceededTime($twoStepAuth);
        }

        $data = [
            'user'              => $this->_user,
            'remainingAttempts' => $this->_remainingAttempts + 1,
        ];

        if ($this->_authCount > config('laravel2step.laravel2stepExceededCount')) {
            $exceededTimeDetails = $this->exceededTimeParser($twoStepAuth->updated_at);

            $data['timeUntilUnlock'] = $exceededTimeDetails['tomorrow'];
            $data['timeCountdownUnlock'] = $exceededTimeDetails['remaining'];

            return View('laravel2step::twostep.exceeded')->with($data);
        }

        $now = new Carbon();
        $sentTimestamp = $twoStepAuth->requestDate;

        if (!$twoStepAuth->authCode) {
            $twoStepAuth->authCode = $this->generateCode();
            $twoStepAuth->save();
        }

        if (!$sentTimestamp) {
            $this->sendVerificationCodeNotification($twoStepAuth);
        } else {
            $timeBuffer = config('laravel2step.laravel2stepTimeResetBufferSeconds');
            $timeAllowedToSendCode = $sentTimestamp->addSeconds($timeBuffer);
            if ($now->gt($timeAllowedToSendCode)) {
                $this->sendVerificationCodeNotification($twoStepAuth);
                $twoStepAuth->requestDate = new Carbon();
                $twoStepAuth->save();
            }
        }

        return View('laravel2step::twostep.verification')->with($data);
    }
public function showVerification ( ) { if ( ! config ( 'laravel2step.laravel2stepEnabled' ) ) { abort ( 404 ) ; } $ twoStepAuth = $ this -> _twoStepAuth ; $ authStatus = $ this -> _authStatus ; if ( $ this -> checkExceededTime ( $ twoStepAuth -> updated_at ) ) { $ this -> resetExceededTime ( $ twoStepAuth ) ; } $ data = [ 'user' => $ this -> _user , 'remainingAttempts' => $ this -> _remainingAttempts + 1 , ] ; if ( $ this -> _authCount > config ( 'laravel2step.laravel2stepExceededCount' ) ) { $ exceededTimeDetails = $ this -> exceededTimeParser ( $ twoStepAuth -> updated_at ) ; $ data [ 'timeUntilUnlock' ] = $ exceededTimeDetails [ 'tomorrow' ] ; $ data [ 'timeCountdownUnlock' ] = $ exceededTimeDetails [ 'remaining' ] ; return View ( 'laravel2step::twostep.exceeded' ) -> with ( $ data ) ; } $ now = new Carbon ( ) ; $ sentTimestamp = $ twoStepAuth -> requestDate ; if ( ! $ twoStepAuth -> authCode ) { $ twoStepAuth -> authCode = $ this -> generateCode ( ) ; $ twoStepAuth -> save ( ) ; } if ( ! $ sentTimestamp ) { $ this -> sendVerificationCodeNotification ( $ twoStepAuth ) ; } else { $ timeBuffer = config ( 'laravel2step.laravel2stepTimeResetBufferSeconds' ) ; $ timeAllowedToSendCode = $ sentTimestamp -> addSeconds ( $ timeBuffer ) ; if ( $ now -> gt ( $ timeAllowedToSendCode ) ) { $ this -> sendVerificationCodeNotification ( $ twoStepAuth ) ; $ twoStepAuth -> requestDate = new Carbon ( ) ; $ twoStepAuth -> save ( ) ; } } return View ( 'laravel2step::twostep.verification' ) -> with ( $ data ) ; }
Show the twostep verification form.

@return \Illuminate\Http\Response
Show the twostep verification form .