Hi,
How to set value in GridView from model function? In Yii1 I have
‘value’=>array($model, ‘functionName’).
Hi,
How to set value in GridView from model function? In Yii1 I have
‘value’=>array($model, ‘functionName’).
I think that should work.
[
'label' => 'Uppercase Name', // it can be 'attribute' => 'tableField' to.
'format' => 'text',
'value' => function($model) {
return strtoupper($model->name);
}
]