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

Better way to define methods

Hi,

I have an api with a lot of method (app->get(...), app->post(...) ...) approximately 150 methods. I wondered if the fact that all these methods is defines in index.php could slow the execution of petitions? Is there a way to be able to define all the method of each controller in a file for better organization and keep index.php clean?

Thanks



7.9k

Hi, you can use this base project it will easier to manage your method : https://github.com/Atriedes/phalcon-restful-webservice