Hi to all
I'm facing problems with route on phalcon
Here is my route:
$router->add('/carregador/carregar-por-quantidade/:param',
['controller' => 'Carregador',
'action' => 'carregarPorQuantidade',
'param' => 1]);
Here is my notFound route:
$router->notFound(
[
'controller' => 'Carregador',
'action' => 'route404',
]
);
Here is my carregarPorQuantidadeAction on CarregadorController:
public function carregarPorQuantidadeAction($quant) {
var_dump($this->dispatcher->getParam("param"));
var_dump($this->dispatcher->getParams());
var_dump('oi teste');
var_dump($quant);die;
}
Here my route404Action:
public function route404Action() {
var_dump('naƵ encontrou a merda');
var_dump($this->dispatcher->getParams());
}
The problem is clear for me. When I try to use some parameter , it don't find the route to carregarPorQuantidade and goes to route404. If I dont use any parameters on carregarPorQuantidade, it finds the route perfectly. So, I'm new here and I need some help.
Thank you in advance.