Hi there,
I've tried to setup custom routing for the first time. To emulate the default behaviour, I've tried the following code. The only thing that works is the '/' option. If I try and load the other options, the URL in the address bar changes but the page doesn't. What am I missing? This code is in index.php.
Thanks.
/**
* Setup router
*/
$di->set('router', function() {
$router = new \Phalcon\Mvc\Router(false);
$router->setDefaultController('index');
$router->setDefaultAction('index');
$router->add('/', array(
"controller" => 'index',
"action" => 'index'
));
$router->add("/:controller/:action/:params", array(
"controller" => 1,
"action" => 2,
"params" => 3
));
$router->handle();
return $router;
});