Browse Source

修复设置路由前缀为"/"时权限管理表单无法读取路由信息问题

jiangqh 3 years ago
parent
commit
904d434f94
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Http/Controllers/PermissionController.php

+ 1 - 1
src/Http/Controllers/PermissionController.php

@@ -151,7 +151,7 @@ class PermissionController extends AdminController
         $container = collect();
         $container = collect();
 
 
         $routes = collect(app('router')->getRoutes())->map(function ($route) use ($prefix, $container) {
         $routes = collect(app('router')->getRoutes())->map(function ($route) use ($prefix, $container) {
-            if (! Str::startsWith($uri = $route->uri(), $prefix) && $prefix) {
+            if (! Str::startsWith($uri = $route->uri(), $prefix) && $prefix && $prefix !== '/') {
                 return;
                 return;
             }
             }