So, basically just started playing with routes
, and I am already having trouble.
Basically, what I'm trying to achieve is something like this:
// When user type an URL like this
.../my-phalcon-project/activate/12345
//the '12345' should be a parameter retrieved in indexAction from activateController
pretty simple, right? But I can't get this working.
This is the code used in router:
#...
$router->add(
"/activate/{hash}",
array(
"controller" => "activate",
"action" => "index",
)
);
And in the ActivateController:
# indexAction()...
print_r($this->dispatcher->getParam("hash"));
Aaand, nothing is showed. Any idea of what I'm doing wrong here?