-1

Hi Everyone.

Here I have really very simple question.

I’m in

modules/guestbook/admin.php 

and I want to load model from a different module

modules/admin/models/

This Method:

$this->load->model('someModel', 'someModel'); is not working bcz HMVC is looking only in the same module the controller is in or in application/models/ 

Could someone suggest to Josh Yudell that how can do that with HMCV. I tried using

Modules::find,Modules::load Modules::load_file, bt there is no result with it.

Thanks in advance. Josh Yudell

fotanus
  • 19,618
  • 13
  • 77
  • 111

2 Answers2

0

What about calling the Admin Module from inside Guestbook Module. You shouldnt be accessing the model directly.

enbits
  • 66
  • 6
0

Id suggest that you should provide your load with the path to the module directory. You havent provided your question with environment you are working in.

In codeigniter HMVC, where the structure is more rigorous:

 Modules::run('admin/get_account_details_model'); or $this->load->module('admin/get_account_details_model');
Jakub
  • 479
  • 5
  • 17