Welcome Guest, Not a member yet? Register   Sign In
How to load a model of a different module in a controller?
#11

[eluser]Johan André[/eluser]
It seem I can't get this to work:

Code:
$this->load->model('module/model');

I try to load the model from a another module.
Have I gotten this wrong?

I don't want to access the model thru the models controller as it seems a little too much work.
#12

[eluser]dreamynsx[/eluser]
Any luck with getting the model to load from another module ? I'm trying to do the same.
#13

[eluser]yuga[/eluser]
I've succesfully implemented calling model from the module in this way:

Code:
$this->load->module('some_module');
$this->needed_model->method();

class Some_module extends Controller
{
   public function __construct()
      {
           $this->load->model('needed_model');
      }
}




Theme © iAndrew 2016 - Forum software by © MyBB