Вопрос

Lets say I have 2 modules: A and B.

If I want to call a function in one of the models of module B from module A, what is the correct way?

Should the communication between modules only happen between controllers or I can call directly a model from module B in a controller form module A?

Thanks.

Это было полезно?

Решение

follow the steps below

1) load model of B from A module like $this->load->model("b_model");

2) if your function name is user then call like this $this->b_model->user();
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top