mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Added prependPrefix to Group class & updated documentation.
This commit is contained in:
@@ -153,6 +153,17 @@ class RouteGroup extends Route implements IGroupRoute
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepend prefix
|
||||
*
|
||||
* @param string $url
|
||||
* @return static
|
||||
*/
|
||||
public function prependUrl(string $url): IGroupRoute
|
||||
{
|
||||
return $this->setPrefix(rtrim($url, '/') . $this->prefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set prefix that child-routes will inherit.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user