request->post('type', 0)); if ($type) { $where['type'] = $type; } $source = intval($this->request->post('source', 0)); if ($source) { $where['source'] = $source; } $list = (new UserInvoice)->getList($where); $data['list'] = $list->items(); $data['total'] = $list->total(); return $this->renderSuccess($data); } }