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

HELP IN FOLLOWING PROPER MVC

Hi Friends, I am using phalcon for my developement. But I am not getting how to follow proper mvc pattern. I wrote Quries on a view and but according to mvc its not proper way. I dont have idea about writting custom funcitons in respective model and then call those model functions from controller and then pass it to view.

Pls Give me a link



33.8k

A model is just a class: you use it anywhere in the app as you always do (remember to insert the models folder in the autoloader).

And, as you say, you write the function in the class, build the query there, and return the results.