Hello everyone,
again I got a little question. Currently I'm trying to implement a RESTful service. I already implemented a rest controller that redirect for each type (get, post etc.). Now I got a problem with my router.
Here is my router:
$router = new Phalcon\Mvc\Router(false);
$router->add("/", array('module' => 'core', 'controller' => 'index','action' => 'get')); // works
$router->add('/:module', array('module' => 1)); // works
$router->add('/:module/:controller', array('module' => 1,'controller' => 2)); // works
$router->add('/:module/:controller/:params', array('module' => 1, 'controller' => 2, 'params' => 3)); // works not :(
$router->notFound(array('module' => 'core', 'controller' => 'index', 'action' => 'error')); // works
$router->setDefaults(array('module' => 'core', 'controller' => 'index', 'action' => 'index')); // works
Does anybody now, why this here: /:module/:controller/:params not works properly? Is it mandatory to set an action?
Thanks!