[ 'keyword', 'is_top', 'source_id', 'basic_class_id', ], 'getArticleScienceList' => [ 'keyword', 'is_top', 'source_id', 'basic_class_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 [ 'is_top' => ['sometimes','numeric','min:0','max:1'], ]; } /** * 获取已定义验证规则的错误消息. */ public function messages(): array { return [ 'is_top.required' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR), 'is_top.numeric' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR), 'is_top.min' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR), 'is_top.max' => HttpEnumCode::getMessage(HttpEnumCode::CLIENT_HTTP_ERROR), ]; } }