We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

something about Routing

URL:https://abc.com/zone/1/dadada
https://abc.com/zone/1
https://dadada.abc.com/zone/1

      writing now:   
      router:    
      $router->addGet("/zone/:int", array(   
      'module'     => 'zone',   
      'controller' => 'index',   
      'action'     => 'detail',   
      'id'         => 1,   
      ));    
      $router->addGet("/zone/:int/{types}", array(   
      'module'     => 1,   
      'controller' => 'index',   
      'action'     => 'detail',    
      'id'         => 2,   
      'type'       => 3,   
      ));    
      controller:   
      public function detailAction($id=0,$type='projects'){    
      echo $id;    
      echo $type;    
      }    

I would like to achieve:
controller:
public function detailAction($id=0,$type='projects'){
echo $id; // 1
echo $type; //dadada
}

How can I write routers ??????