This commit is contained in:
1099438829 2021-04-02 15:11:16 +08:00
parent 9c80b44950
commit c34bf753f6
1 changed files with 18 additions and 0 deletions

View File

@ -152,4 +152,22 @@ class Category extends AuthController
$this->assign("template_list",$themeList); $this->assign("template_list",$themeList);
return $this->fetch(); return $this->fetch();
} }
/**
* 删除分类
* @param Request $request
* @return mixed|void
* @author 李玉坤
* @date 2021-04-01 21:56
*/
public function del(Request $request)
{
$where = Util::postMore([
['id',''],
]);
$model = new aModel();
$model->where('id',$where['id'])->delete();
$res = DocumentCategoryContent::where('id',$where['id'])->delete();
return $res ? app("json")->success("操作成功",'code') : app("json")->fail("操作失败");
}
} }