ZxcZxc123 vor 2 Jahren
Ursprung
Commit
3841d8658c

+ 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']])) {