循环获取数据

  while ($parentId) {
            $categoryBack     = CategoryBack::query()->where('id', $parentId)->first();
            $categoryBackNameArr[] = $categoryBack;
            $parentId         = data_get($categoryBack, 'parent_id');
        }

 

posted @ 2019-02-17 15:11  泥土里的绽放  阅读(157)  评论(0编辑  收藏  举报