|
|
@@ -23,7 +23,7 @@ class EducationController
|
|
|
->order('sort', 'asc')
|
|
|
->column('id,pid,name,sort', 'id');
|
|
|
|
|
|
- $tree = []; //格式化好的树
|
|
|
+ $tree = array(); //格式化好的树
|
|
|
foreach ($items as $key => $item) {
|
|
|
$items[$key]['oriName'] = $item['name'];
|
|
|
if (isset($items[$item['pid']])) {
|
|
|
@@ -33,7 +33,9 @@ class EducationController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return app('json')->success($tree);
|
|
|
+// $data = array_values($tree);
|
|
|
+// $msg = '获取分类成功';
|
|
|
+ return app('json') -> success($tree);
|
|
|
}
|
|
|
|
|
|
|