AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
# common_delete ## 说明 豆信3在`/App/Common/Controller/CommonController.class.php`中封装了一个common_delete()方法,用于数据的通用删除。在任意直接继承或者间接继承了CommonController的控制器中,使用$this->common_delete()写法可以调用通用的数据编辑模板删除数据。 ## 示例 ![](https://box.kancloud.cn/2016-08-21_57b9766f6bde7.png) ## 代码实现 ~~~ /** * 删除公众号 * @author 艾逗笔<765532665@qq.com> */ public function delete() { $this->setModel('mp') ->setDeleteMap(array('id'=>I('get.id'))) ->common_delete(); } ~~~