How to send query with join to a ListView and access a data that is not of the model that you sent

0

How to send query with join to a ListView and access a data that is not of the model that you sent. Ex:

//controlador

Alumno::findbysql("consulta con join");

//vista 

<?= ListView::widget([
            'summary' => '',
        'dataProvider' => $dataProvider,
        'itemOptions' => ['class' => 'item'],
        'itemView' =>function ($model, $key, $index, $widget) {
            return /*Aqui es donde quiero mostrar un atributto de la tabla externa al join*/. "$model->monto";
        }
    
asked by Yoniel Rodriguez 18.05.2018 в 23:41
source

0 answers