diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
| commit | 968662ee16a1efc7cb7c176a42af91f36eecc9ca (patch) | |
| tree | b700510f895c8e059f17d8fcabbb8b8d5471824f /src/GroupDefinition.php | |
| parent | 25780fef281782ce7e88c27cb23cb3d9e9d6bd03 (diff) | |
Create a group route and name it
Diffstat (limited to 'src/GroupDefinition.php')
| -rw-r--r-- | src/GroupDefinition.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GroupDefinition.php b/src/GroupDefinition.php index 41e359d..1ffddc7 100644 --- a/src/GroupDefinition.php +++ b/src/GroupDefinition.php @@ -18,7 +18,11 @@ class GroupDefinition public function make(HttpMethod $method, string $path, callable $handler): RouteDefinition { - + return $this->group->getRouter()->make( + $method, + $this->group->getFullPrefix() . '/'. ltrim($path, '/'), + $handler + )->inGroup($this->group); } private function getGroup(): Group |
