protected function buildException($key, $maxAttempts)
    {
        $retryAfter = $this->getTimeUntilNextRetry($key);

        $headers = $this->getHeaders(
            $maxAttempts,
            $this->calculateRemainingAttempts($key, $maxAttempts, $retryAfter),
            $retryAfter
        );

        return new ThrottleRequestsException(
            'Too Many Attempts.', null, $headers
        );
    }
protected function buildException($key, $maxAttempts)
    {
        $retryAfter = $this->getTimeUntilNextRetry($key);

        $headers = $this->getHeaders(
            $maxAttempts,
            $this->calculateRemainingAttempts($key, $maxAttempts, $retryAfter),
            $retryAfter
        );

        return new ThrottleRequestsException(
            'Too Many Attempts.', null, $headers
        );
    }
protected function buildException ( $ key , $ maxAttempts ) { $ retryAfter = $ this -> getTimeUntilNextRetry ( $ key ) ; $ headers = $ this -> getHeaders ( $ maxAttempts , $ this -> calculateRemainingAttempts ( $ key , $ maxAttempts , $ retryAfter ) , $ retryAfter ) ; return new ThrottleRequestsException ( 'Too Many Attempts.' , null , $ headers ) ; }
Create a 'too many attempts' exception.

@param  string  $key
@param  int  $maxAttempts
@return \Illuminate\Http\Exceptions\ThrottleRequestsException
Create a too many attempts exception .