소스 검색

限制菜单显示2层

moshaorui 5 달 전
부모
커밋
b8b027c499
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Distributor/Repositories/SiteMenu.php

+ 1 - 1
app/Distributor/Repositories/SiteMenu.php

@@ -31,7 +31,7 @@ class SiteMenu extends EloquentRepository
         $selectOptions =  Model::class::selectOptions($closure);
         //只显示2层
         foreach ($selectOptions as $key => $value) {
-            if (substr_count($value,' ') > 2) {
+            if (substr_count($value,' ') > 8) {
                 unset($selectOptions[$key]);
             }
         }