Como pasar datos de otro model por controller view

Hola estoy intentando recuperar datos de otro model y pasarlos por controllador.

Intente hacer esto Captura de pantalla de 2021-01-09 10-37-33
La variable $conv ya me recupera la informacion de la tabla convenio segun el id elegido.
Y quiero imprimir unos datos que me recupera la variable.


Los datos que quiere mostrar son el de plazos y tasa.

Aqui esta mi view.


Captura de pantalla de 2021-01-09 10-41-04

Como lo podria lograr haciendolo por el controlador o existe alguna forma mas facil?

‘model’ => $convenio

En el controlador? Y en la vista ya podre llamarlos?

Sorry I don’t speak spanish.
If the question is how to access the data (‘convenio’=>$conv) from the controller to the view, then the view receives a variable called $convenio that you should reference in your widget call.
If I misunderstood the question then sorry.

If exactly that I want to do.
So in the widget I just put ‘convention’ => $ conv. Inside the detail view

In the widget view you have no $conv variable, only $convenio.
This is what render( … ‘convenio’ => $conv ) does: it defines a variable named $convenio accessible in the view ( ‘=> $conv’ is the value that will be contained in $convenio).

In other words $conv does not exist in the view.

So in the widget, I suppose you have to pass ‘model’ => $convenio.

1 Like

ok, that worked for me. Thank you very much for the help