ProviderSpecialityRequest.php 640 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Requests;
  3. use Illuminate\Contracts\Validation\ValidationRule;
  4. use Illuminate\Foundation\Http\FormRequest;
  5. class ProviderSpecialityRequest 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. * @return array<string, ValidationRule|array|string>
  18. */
  19. public function rules(): array
  20. {
  21. return [
  22. 'speciality_id' => ['required', 'integer', 'exists:specialities,id'],
  23. ];
  24. }
  25. }