diff --git a/Router/Router.php b/Router/Router.php index 99db64121..064a9cd1c 100644 --- a/Router/Router.php +++ b/Router/Router.php @@ -85,6 +85,10 @@ class Router */ public function add(string $route, $destination, string $verb = RouteVerb::GET) { + if(!isset($this->routes[$route])) { + $this->routes[$route] = []; + } + $this->routes[$route][] = [ 'dest' => $destination, 'verb' => $verb,