reverted last name change, not needed
This commit is contained in:
parent
48585f14ab
commit
572cc1eb89
|
@ -107,18 +107,18 @@ class Router
|
|||
if ($route->getName() == $routeName) {
|
||||
if ($vars) {
|
||||
// build route for dynamic routes
|
||||
$newRoute = $route->getRoute();
|
||||
$route = $route->getRoute();
|
||||
// replace placeholder with current values
|
||||
foreach ($vars as $key => $value) {
|
||||
$newRoute = str_replace(search: '{' . $key . '}', replace: $value, subject: $route);
|
||||
$route = str_replace(search: '{' . $key . '}', replace: $value, subject: $route);
|
||||
}
|
||||
return $newRoute;
|
||||
return $route;
|
||||
} else {
|
||||
return $route->getRoute();
|
||||
}
|
||||
}
|
||||
}
|
||||
// no 404, this is reached only if the code is wrong
|
||||
// no 404, this is reached only if the code is buggy
|
||||
die("Missing Route: $routeName");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue