Welcome Guest, Not a member yet? Register   Sign In
Model / Controller access
#1

Fairly new to using CI, and this is probably a stupid question, but I figured I'd ask, because the answer didn't seem 100% apparent to me.




What is the proper  way of globally initiating a new model for use throughout a controller ?   or do I need to do a $model = new someModelname();  in each function that I want to access the model from ?

Do I just drop it in something like the index function, and call it from my other functions using $this->index()->model->SomeModelFunction   



Thanks,
Reply


Messages In This Thread
Model / Controller access - by newbie_to_ci - 12-25-2020, 04:44 PM
RE: Model / Controller access - by John_Betong - 12-25-2020, 04:59 PM
RE: Model / Controller access - by newbie_to_ci - 12-25-2020, 05:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB