Skip to content

Commit

Permalink
修复设置路由前缀为"/"时权限管理表单无法读取路由信息问题
Browse files Browse the repository at this point in the history
  • Loading branch information
jqhph committed Feb 19, 2022
1 parent 5684e98 commit 904d434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/PermissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function getRoutes()
$container = collect();

$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;
}

Expand Down

0 comments on commit 904d434

Please sign in to comment.