ZxcZxc123 3 년 전
부모
커밋
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']])) {