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

how to implement RESTFULL in MVC app

Dear, I have an idea to implement a restfull service but inside MVC app. How to do that with Phalcon?

when I do like that: $application = new \Phalcon\Mvc\Application(); $application->get('/api/robots', function() { echo 'hello world'; }); It said: Fatal error: Call to undefined method Phalcon\Mvc\Application::get() in C:\xampp2\htdocs\wamserver\public\index.php on line 92

You need $application = new \Phalcon\Mvc\Micro();

This project is an example of how you can build an application with several module mvc and also a RESTFull API.

https://github.com/ovr/phalcon-module-skeleton/blob/master/application/modules/api/Module.php