Welcome Guest, Not a member yet? Register   Sign In
Old way of using classes and CI's way - Confused
#3

(12-27-2018, 05:14 PM)ciadmin Wrote: CI3 wants classes to be named UCfirst, i.e. $this->load->model('User_model'), and with the source code in models/User_model.php.
Once loaded, the model is available as a property, eg $this->user_model, without having to instantiate it.

Your naming confuses me ... I would think that models/User.php would *be* a model for a user.
I might use something like models/Users for the "model" (collection) and models/User for the "entity".


Write the code how you would write it.
Reply


Messages In This Thread
RE: Old way of using classes and CI's way - Confused - by dreamweaver - 12-28-2018, 12:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB