Hi,
Below is the code of routing which I have added to my app, but the default route is not picking the / default route for home, what is the issue , and notfound working when default route / called, any idea?
<?php
$router = new \Phalcon\Mvc\Router(false);
/**
* Nfi routes
*/
$router->add("/", array(
'module' => 'site',
'namespace' => 'FZ\Site\Controllers\\',
'controller' => 'home',
'action' => 'index'
));
$router->add("/:controller", array(
'module' => 'site',
'namespace' => 'FZ\Site\Controllers\\',
'controller' => 1,
'action' => 'index'
));
$router->add("/:controller/", array(
'module' => 'site',
'namespace' => 'FZ\Site\Controllers\\',
'controller' => 1,
'action' => 'index'
));
//frontend website module set
$router->add("/:controller/:action/:params", array(
'module' => 'site',
'namespace' => 'FZ\Site\Controllers\\',
"controller" => 1,
"action" => 2,
"params" => 3,
));
$router->add("/nfi", array(
'module' => 'nfi',
'namespace' => 'FZ\Nfi\Controllers\\',
'controller' => "session",
'action' => 'index'
));
$router->add("/nfi/", array(
'module' => 'nfi',
'namespace' => 'FZ\Nfi\Controllers\\',
'controller' => "session",
'action' => 'index'
));
$router->add("/nfi/:controller", array(
'module' => 'nfi',
'namespace' => 'FZ\Nfi\Controllers\\',
'controller' => 1,
'action' => 'index'
));
$router->add("/nfi/:controller/", array(
'module' => 'nfi',
'namespace' => 'FZ\Nfi\Controllers\\',
'controller' => 1,
'action' => 'index'
));
$router->add("/nfi/:controller/:action/:params", array(
'module' => 'nfi',
'namespace' => 'FZ\Nfi\Controllers\\',
"controller" => 1,
"action" => 2,
"params" => 3,
));
//Set 404 paths
$router->notFound(array(
'module' => 'site',
'namespace' => 'FZ\Site\Controllers\\',
'controller' => 'error',
'action' => 'fof'
));
return $router;