IndexDiscussionReplyRequest.php 539 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Http\Requests\V3;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. /**
  5. * `GET /v3/discussions/{discussion}/replies` 的入参:只有分页。
  6. */
  7. class IndexDiscussionReplyRequest extends FormRequest
  8. {
  9. public function authorize(): bool
  10. {
  11. return true;
  12. }
  13. /**
  14. * @return array<string, array<int, mixed>>
  15. */
  16. public function rules(): array
  17. {
  18. return [
  19. 'page' => ['integer', 'min:1'],
  20. 'per_page' => ['integer', 'min:1', 'max:200'],
  21. ];
  22. }
  23. }