讨论数量: 
            
            
    
            @pndx 控制器 获取无限分类 user::query()->with('allChildren')->get(); 下面的方法是定义在user模型中 // 模型文件 public function children() { return $this->hasMany(get_class($this), 'parent_id' ,'id'); } public function allChildren() { return $this->children()->with( 'allChildren' ); }
 
           helong3314 的个人博客
 helong3314 的个人博客
         
             
             
             
                     
                     
             
           
           关于 LearnKu
                关于 LearnKu
               
                     
                     
                     粤公网安备 44030502004330号
 粤公网安备 44030502004330号 
 
推荐文章: