validate([ 'page' => ['nullable', 'integer', 'min:1'], 'limit' => ['nullable', 'integer', 'min:1'], 'type' => ['required', 'integer', 'in:0,1,2'], 'order_no' => ['nullable', 'string'], 'status' => ['nullable', 'integer', 'in:0,1,2,3'], ]); $result = PaymentOrderService::paginate($params); } catch (ValidationException $e) { return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first()); } catch (Exception $e) { return $this->error(intval($e->getCode())); } return $this->success($result); } }