PlaceAutoSearchRequest.php 667 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Request\Api\v1\Common;
  4. use Hyperf\Validation\Request\FormRequest;
  5. class PlaceAutoSearchRequest extends FormRequest
  6. {
  7. /**
  8. * Determine if the user is authorized to make this request.
  9. */
  10. public function authorize(): bool
  11. {
  12. return true;
  13. }
  14. /**
  15. * Get the validation rules that apply to the request.
  16. */
  17. public function rules(): array
  18. {
  19. return [
  20. 'input' => 'required|string',
  21. 'latitude' => 'nullable|string',
  22. 'longitude' => 'nullable|string',
  23. 'sessionToken' => 'nullable|string',
  24. ];
  25. }
  26. }