| 1 | <?php |
||
| 8 | class ThrottleRequests extends BaseThrottle |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Create a 'too many attempts' response. |
||
| 12 | * |
||
| 13 | * @param string $key |
||
| 14 | * @param int $maxAttempts |
||
| 15 | * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response |
||
| 16 | */ |
||
| 17 | protected function buildResponse($key, $maxAttempts) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Add the limit header information to the given response. |
||
| 28 | * |
||
| 29 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
| 30 | * @param int $maxAttempts |
||
| 31 | * @param int $remainingAttempts |
||
| 32 | * @param int|null $retryAfter |
||
| 33 | * @return \Symfony\Component\HttpFoundation\Response |
||
| 34 | */ |
||
| 35 | protected function addHeaders(Response $response, $maxAttempts, $remainingAttempts, $retryAfter = null) |
||
| 39 | } |
||
| 40 |