I have a gridview in the index, I want to show the width and height as in one column, how can I do it here is the view code
<?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'fld_id', 'fld_name', [ 'label' => 'Material Name', 'attribute' => 'fld_material_id', 'value' => 'fldMaterial.fld_name', ], [ 'label' => 'Size', 'attribute' => 'fld_size_id', 'value' => 'fldSize.fld_width', ],
I have an fldSize relation in the model, only fld_width is just displayed here. I want to show it in fld_width format. "x" .fld_height, how can I do this in Yii2
source share