0

I have 2 controller controllers placed in my administration module which are:

  • modules/administration/controllers/Administration.php
  • modules/administration/controllers/Customers.php

The problem i have is when i want to display customer details in the admin view via:

echo modules::run('administration/customers/view_all');

I get nothing of course it looks as if codeigniter is looking for a (customers) method inside the administration controller. Has anyone else encountered this issue and knows how to resolve it?

Jeremy Harris
  • 24,318
  • 13
  • 79
  • 133
chris keenan
  • 23
  • 1
  • 9
  • How about `partial views`? – Hackerman Jan 27 '17 at 19:04
  • all i want is return the data to the view file which is placed in the administration views folder so i am not entirely sure what you mean by partial view – chris keenan Jan 27 '17 at 19:42
  • You just want to call a method from a different controller that renders a view, right...I have the code to do that, I am going to post it as soon as I got home :) – Hackerman Jan 27 '17 at 20:03
  • i have 2 controllers inside my module i want to echo modules run a function from one of the controller to another whitin the same module for example echo modules:: run ('administration/customers/view_all_customers and displaying it in the administration view administration being the module customers being the controller and view_all_customers being the method – chris keenan Jan 27 '17 at 21:02
  • Possible duplicate of [codeigniter+HMVC cross module call controller->method](http://stackoverflow.com/questions/14947261/codeigniterhmvc-cross-module-call-controller-method) – Bhavesh G Apr 02 '17 at 17:17

0 Answers0