dataLists(new CommunityCategoryLists()); } public function all() { return $this->data(CommunityCategoryLogic::all()); } public function detail() { $params = (new CommunityCategoryValidate())->goCheck('detail'); return $this->data(CommunityCategoryLogic::detail($params)); } public function add() { $params = (new CommunityCategoryValidate())->post()->goCheck('add'); if (CommunityCategoryLogic::add($params)) { return $this->success('添加成功', [], 1, 1); } return $this->fail(CommunityCategoryLogic::getError()); } public function edit() { $params = (new CommunityCategoryValidate())->post()->goCheck('edit'); if (CommunityCategoryLogic::edit($params)) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(CommunityCategoryLogic::getError()); } public function delete() { $params = (new CommunityCategoryValidate())->post()->goCheck('delete'); if (CommunityCategoryLogic::delete($params)) { return $this->success('删除成功', [], 1, 1); } return $this->fail(CommunityCategoryLogic::getError()); } }