Welcome Guest, Not a member yet? Register   Sign In
better approach to work with models
#2

There's no right or wrong answer. It depends on how you want to organize your application. Personally I prefer to have the least possible logic in the controllers and in the models. I prefer to keep them simple and put most of the logic in a library. If your application is super small, it may be overkill to do it this way. But if you have a somewhat big application, it's easier to develop and to maintain when the logic is not everywhere in the controllers, the models, etc. It's also easier to reuse those functions if you need them in multiple places in your code. You can see an example of this in my tutorial for a basic application.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
better approach to work with models - by tino - 07-01-2021, 11:16 AM
RE: better approach to work with models - by includebeer - 07-01-2021, 03:26 PM
RE: better approach to work with models - by tino - 07-02-2021, 02:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB