[FEATURE] Added sub-domain routing.

- Updated documentation.
This commit is contained in:
Simon Sessingø
2015-12-10 03:31:57 +01:00
parent 2128a24f1c
commit c74d83796f
5 changed files with 119 additions and 77 deletions
+3 -2
View File
@@ -60,12 +60,12 @@ class RouterBase {
}
$newPrefixes = $prefixes;
$mergedSettings = array_merge($settings, $route->getMergeableSettings());
if($route->getPrefix()) {
array_push($newPrefixes, rtrim($route->getPrefix(), '/'));
}
$route->addSettings($mergedSettings);
$route->addSettings($settings);
if(!($route instanceof RouterGroup)) {
if(is_array($newPrefixes) && count($newPrefixes) && $backstack) {
@@ -79,6 +79,7 @@ class RouterBase {
if($route instanceof RouterGroup && is_callable($route->getCallback())) {
$route->renderRoute($this->request);
$activeGroup = $route;
$mergedSettings = array_merge($settings, $route->getMergeableSettings());
}
$this->currentRoute = null;