Model Autoload |
There is a global helper method for just that.
PHP Code: $model = model('your_model_name'); SEE: CodeIgniter 4 User Guide - Global Functions and Constants What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Thank you for your answer. ..I dont want any models to load in the view.
I mean....$this->citizen_model->somefunction(); I call this on the view..but I am not load the citizen model in the view...but the function return values...why?..it is a bug on codeigniter?
I guess you are using CodeIgniter 3 based on your last reply.
You can't remove that, it will always be accessible. You need to re-write how CodeIgniter works to get rid of that, it's not a bug. It's a "feature". |
Welcome Guest, Not a member yet? Register Sign In |