Assuming you are using a GridView in Yii2. In the value of column
, you can use a closure
and make the comparison:
[
'attribute' => 'gross_total',
'header' => 'SAÍDAS',
'value' => function ($model, $key, $index, $column) {
if($model->gross_total > 0){
return 'Gross total maior que zero.'
}
}
],