I have multi models application. In my Bootrstrap I set up to DI Roter class
$this->getDi()->set('router', function () {
$router = new \Phalcon\Mvc\Router(false);
$router->add("/:module/:controller/:action/:params", array(
"module" => 1,
"controller" => 2,
"action" => 3,
"params" => 4,
));
$router->add('/', array(
'namespace' => 'Frontend\Controllers',
'module' => 'frontend',
'controller' => 'index',
'action' => 'test'
));
return $router;
}, true);
In my module in Module.php file I add additional routes:
$router = $di->get('router');
$router->add("/test", array(
'module' => 'frontend',
'controller' => 'index',
'action' => 'test'
));
and unfortunately no routes which were added to Module.php are working.