Skip to content

Commit 904d434

Browse files
committed
修复设置路由前缀为"/"时权限管理表单无法读取路由信息问题
1 parent 5684e98 commit 904d434

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Controllers/PermissionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function getRoutes()
151151
$container = collect();
152152

153153
$routes = collect(app('router')->getRoutes())->map(function ($route) use ($prefix, $container) {
154-
if (! Str::startsWith($uri = $route->uri(), $prefix) && $prefix) {
154+
if (! Str::startsWith($uri = $route->uri(), $prefix) && $prefix && $prefix !== '/') {
155155
return;
156156
}
157157

0 commit comments

Comments
 (0)