Problems With Modules.

Hi, I am developing an application using Yii2 using modules. Right now I have two modules: Module A and Module B. In the module b create a widget folder. In this widget called a model from module A, but when I do this I have the the following message:

Class 'app\modules\module_b\models\CampoHorarioDetalle not found

As I see the widget model looking into the module B, but I need to locate the model within the module A.

In my app:

Module B = Reservas

Module A = Horarios

Many Thanks for the help.


You make sure namespaces match. So post the model code (just class definition without its methods and how do you call it in that widget.

check namespace if you are using backend then check namespace should have same if u r using app then check it should have app,maybe you are using somewhere backend or otherside using app

which class you want to use just go to that class nd use that namespace exactly