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

router advanced behavior

I get error when I have controler name like this: "ClientSessionController", when i changed name to "ClientsessionController" everything is ok, is this a bug?

ClientSessionController setuped like there: https://github.com/phalcon/mvc/tree/master/simple-subcontrollers $router->add('/client/:controller', array( 'namespace' => 'Controllers\Client', 'controller' => 1 ));

I think it because router is case sensitive and controller name is not.



98.9k

That depends on how you pass the controller in the URI:

clientsession -> ClientsessionController ClientSession -> ClientsessionController client-session -> ClientSessionController client_session -> ClientSessionController



2.0k

Thank you for explanation. This works like in zf, I completely forgotten to try it. Now founded in doc: https://docs.phalcon.io/en/latest/reference/routing.html