I'm trying to define a group of routes but Phalcon raises an exception when I mount the group.
class UpdatesGroup extends Phalcon\Mvc\Router\Group {
public function initialize() {
// Sets the default controller for the following routes.
$this->setPaths(['controller' => 'updates']);
$this->addGet('/', ['action' => 'recents']);
$this->addGet('/?tab=popolari', ['action' => 'populars']);
$this->addGet('/?tab=recenti', ['action' => 'recents']);
$this->addGet('/?tab=in-base-ai-miei-tag', ['action' => 'basedOnMyTags']);
$this->addGet('/?tab=piu-votati', ['action' => 'mostVoted']);
$this->addGet('/?tab=piu-discussi', ['action' => 'mostDiscussed']);
$this->addGet('/rss', ['action' => 'rss']);
}
}
$router = new Phalcon\Mvc\Router(false);
$router->mount(new UpdatesGroup());
The exception message is: "The group of routes does not contain any routes" .
What is wrong?