/** * 添加分类 */ public function action() { $this->db()->transaction(); $addResult = \Model\Category::addCategory(); $this->db()->commit(); $this->success('添加分类成功', $this->url(GROUP . '-Category-index')); }