Welcome Guest, Not a member yet? Register   Sign In
Autoloading helpers, models in config vs loading it in controller?
#1

[eluser]Michal1[/eluser]
Hello guys,

every code example I see does load its models, helpers and stuff like that in the controller function.

For example

Code:
function Test()  
    {  
        parent::Controller();  
        $this->load->model('test_model');  
  
    }

While I do all this stuff in config folder and autoloading that. Is this bad approach? If I understand it correctly the only reason why to load it only in certain controller is a speed right?


Messages In This Thread
Autoloading helpers, models in config vs loading it in controller? - by El Forum - 04-30-2012, 08:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB