How to get the contents of another table in Yii?

Asked

Viewed 291 times

0

I’d like to replace the ID, display the employee’s name.

<?php
$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'documento-grid',
    'dataProvider'=>$model->search(),
    'columns'=>array(
        'id_documento',
        'nome_documento',
            array(
            'name'=>'Download',
            'header'=>'Download',
            'type'=>'raw',
            'value'=>'CHtml::link($data->path_documento, array("documento/download","id"=>$data->id_documento))',
            //'htmlOptions'=>array('width'=>'10%'),
        ),
        'id_documento_funcionario',
        array(
            'class'=>'CButtonColumn',
            'template'=>'{view}{delete}',
        ),
    ),
)); 
?>

1 answer

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.