🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` <?php namespace app\agent\controller; use app\agent\model\AgentCategoryModel; use think\Controller; class AdminCategoryController extends Controller { /** * 编辑分类提交 */ public function editPost() { $data = $this->request->param(); $result = $this->validate($data, 'AgentCategory'); if ($result !== true) { $this->error($result); } $agentCategoryModel = new AgentCategoryModel(); $result = $agentCategoryModel->editCategory($data); if ($result === false) { $this->error('保存失败!'); } $this->success('保存成功!'); } } ```