合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
``` <?php namespace app\agent\controller; use app\agent\model\AgentCategoryModel; use think\Controller; class AdminCategoryController extends Controller { /** * 编辑文章分类 */ public function edit() { $id = $this->request->param('id', 0, 'intval'); if ($id > 0) { $category = AgentCategoryModel::get($id)->toArray(); $agentCategoryModel = new AgentCategoryModel(); $categoriesTree = $agentCategoryModel->adminCategoryTree($category['parent_id'], $id); $this->assign($category); $this->assign('categories_tree', $categoriesTree); return $this->fetch(); } else { $this->error('操作错误!'); } } } ```