[ // 获取医院数据 'province_id', 'city_id', 'county_id', ], ]; /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. */ public function rules(): array { return [ 'province_id' => 'required_with:city_id,county_id', 'city_id' => 'required_with:county_id', ]; } /** * 获取已定义验证规则的错误消息. */ public function messages(): array { return [ 'province_id.required_with' => "请选择省份", 'city_id.required_with' => "请选择城市", ]; } }