added js include

This commit is contained in:
tracer 2022-10-25 15:50:25 +02:00
parent 148eff1557
commit ec022d09e4
1 changed files with 11 additions and 2 deletions

View File

@ -107,7 +107,7 @@ class Router
if ($route->getName() == $routeName) { if ($route->getName() == $routeName) {
if ($vars) { if ($vars) {
// build route // build route for dynamic routes
$route = $route->getRoute(); $route = $route->getRoute();
// replace placeholder with current values // replace placeholder with current values
foreach ($vars as $key => $value) { foreach ($vars as $key => $value) {
@ -120,6 +120,15 @@ class Router
} }
} }
// no 404, this is reached only if the code is wrong // no 404, this is reached only if the code is wrong
// TODO doesn't find the last route
/*
foreach (array_merge($this->dynamicRoutes, $this->staticRoutes) as $route) {
echo $route->getRoute() . '<br>';
if ($routeName == $route->getRoute()) {
echo "equal";
}
}
die("Missing Route: $routeName"); die("Missing Route: $routeName");
*/
} }
} }