limiter()->attempts( $this->throttleKey($request) ); return $this->maxAttempts() - $attempts + 1; } /** * {@inheritDoc} */ protected function sendLockoutResponse(Request $request): RedirectResponse { $seconds = $this->limiter()->availableIn( $this->throttleKey($request) ); return redirect('login') ->withInput($request->only($this->username(), 'remember')) ->withErrors([ $this->username() => $this->getLockoutErrorMessage($seconds), ]); } /** * Get the login lockout error message. */ protected function getLockoutErrorMessage($seconds): string { return trans('auth.throttle', ['seconds' => $seconds]); } /** {@inheritDoc} */ protected function maxAttempts() { return setting('throttle_attempts', 5); } /** {@inheritDoc} */ protected function decayMinutes(): int { $lockout = (int) setting('throttle_lockout_time'); return max($lockout, 1); } }