企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
~~~ private function getCateChilds($id = 0,&$arr) { $data = Db::table('__CATEGORY__')->where('pid', $id)->field('id,pid')->select(); if($data){ foreach ($data as $k => $data_) { $d = $this->getCateChilds($data_['id'],$arr); if(!$d){ $arr[]=$data_['id']; } } }else{ $arr[]=$id; } return $arr; } ~~~