UpdateMeAgentThreadRequest.php 525 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Http\Requests\V3;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. /**
  5. * `PATCH /v3/me/agent-threads/{thread}` 的入参:局部更新,目前只有标题可改。
  6. */
  7. class UpdateMeAgentThreadRequest 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. 'title' => ['sometimes', 'string', 'min:1', 'max:255'],
  20. ];
  21. }
  22. }