Welcome Guest, Not a member yet? Register   Sign In
A reflection about Controllers getting fatter in CI4
#2

I try to keep my controllers small, keeping only form validation, user permissions and that kind of stuff. If I feel I have too much business logic to put all in the same model, I will create some libraries that I will call from the controller. I don't think you should be afraid to break things in the new CI4 model. There's not that much magic. It just do the repetitive and boring DB stuff for you. You can add all the functions you want. I also recommend you dive in the code and look what it's actually doing, it helps to understand what is happening "magically".
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
RE: A reflection about Controllers getting fatter in CI4 - by includebeer - 08-13-2019, 06:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB