General rule - when to use a model (Codeigniter)
- by pingu
Hi guys,
I was just curious as to what the rule of thumb was for models. Generally, I use them only for situations where I need to add/edit or update database entries for an object.
However, I'm building an app at the moment that has a "config" table which holds various data, such as last updated, which will control when certain features in the app should be displayed. In this instance, I will mostly need to retrieve data from the config table. Is it worth putting these config methods in model?
I'm interested to hear how more experienced coders approach the MVC methodology in CI - example pseudo methods (e.g., what methods relating to the same object you'd use in the model and the controller) would be most helpful.