ZxcZxc123 2 лет назад
Родитель
Сommit
3841d8658c
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      app/model/api/EducationModel.php
  2. 1 1
      app/system/controller/EducationController.php

+ 1 - 1
app/model/api/EducationModel.php

@@ -30,7 +30,7 @@ class EducationModel extends Model
             ->order('sort', 'asc')
             ->column('id,pid,name,sort', 'id');
 
-        $tree = array();
+        $tree = [] ;
         foreach ($items as $key => $item) {
             $items[$key]['oriName'] = $item['name'];
             if (isset ($items [$item ['pid']])) {

+ 1 - 1
app/system/controller/EducationController.php

@@ -23,7 +23,7 @@ class EducationController
             ->order('sort', 'asc')
             ->column('id,pid,name,sort', 'id');
 
-        $tree = array(); //格式化好的树
+        $tree = []; //格式化好的树
         foreach ($items as $key => $item) {
             $items[$key]['oriName'] = $item['name'];
             if (isset($items[$item['pid']])) {