Browse Source

Router: Add all routes regardless of the URI

master
Riyyi 2 years ago
parent
commit
c18c80d732
  1. 7
      app/classes/Router.php

7
app/classes/Router.php

@ -40,15 +40,8 @@ class Router {
// Process basic routes // Process basic routes
foreach (self::$routes as $route) { foreach (self::$routes as $route) {
// If route does not match the base url
if ($route[0] != $path) {
continue;
}
// ["/example/my-page", "ExampleController", "action", "" : ["view", "title", "description"]], // ["/example/my-page", "ExampleController", "action", "" : ["view", "title", "description"]],
self::addBasicRoute(['GET', 'POST'], $route); self::addBasicRoute(['GET', 'POST'], $route);
break;
} }
self::createNavigation(); self::createNavigation();

Loading…
Cancel
Save