Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to create a model in Multi-Modules project

I use this command to create a project

phalcon project --name=phalcon_multimodule_example --type=modules

then I use this command to create a model

phalcon model Admins

but nothing happend, I need help



78.9k
Accepted
answer

i think models should per project not per module, that doesn't make any sense

I usually use 4 modules per project, but I create all manually

  • Frontend
  • Backend
  • Core << Here I have all the logic and common components
  • Api

Good luck

i think models should per project not per module, that doesn't make any sense

I just wanna point out that this model belong to this module

edited Mar '18

I usually use 4 modules per project, but I create all manually

  • Frontend
  • Backend
  • Core << Here I have all the logic and common components
  • Api

Good luck

I will try it again。 Thanks

Phalcon is not trully modular so you cannot do that without writing your own Application class.

I have my own implementation that makes Phalcon trully modular, there isn't a single code outside of module (well except for bootstrap and index.php). It is much more advanced now but you would be able to write your own if you read here: https://forum.phalconphp.com/discussion/17365/phalcon-is-not-trully-modular-framework-and-how-to-solve-it



58.4k

Good luck in affecting anything about Phalcon at this time.