Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 868a21c

Browse files
committed
fix: patch up nested groups issue
1 parent 964edb3 commit 868a21c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Router.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,17 @@ public static function mount(string $path, $handler)
6161
);
6262

6363
$namespace = static::$namespace;
64-
$groupRoute = static::$groupRoute;
6564

6665
if ($groupOptions['namespace']) {
6766
static::$namespace = $groupOptions['namespace'];
6867
}
6968

70-
static::$groupRoute = $path;
69+
static::$groupRoute = static::$groupRoute . (strpos($path, '/') !== 0 ? "/$path" : $path);
7170

7271
call_user_func($handler);
7372

7473
static::$namespace = $namespace;
75-
static::$groupRoute = $groupRoute;
74+
static::$groupRoute = '';
7675
}
7776

7877
/**

0 commit comments

Comments
 (0)