was going to call the data from model in gridview. I installed advanced grid view via composer and I am using \yiister\grid\widgets\ProgressColumn. but the prolem ProgressColumn widget is not taking
‘value’=>function($model){
$model->paxtashart;
},
as int value, it gives me error: Object of class Closure could not be converted to int
is there any possiblity that I can convert it to int or any other alternative?
here let me present you my entire code:
[
'class' => \yiister\grid\widgets\ProgressColumn::className(),
'attribute' => 'paxta_given',
'size' => \yiister\grid\widgets\ProgressColumn::SIZE_LARGE,
'isAnimated' => true,
'value'=>function($model){
$model->paxtashart;
},
// 'maxValue'=> $fermercha->paxtashart,
// 'minValue'=> $fermercha->paxta_given,
'progressBarClass' => function ($model, $column) {
return $model->{$column->attribute} > 60
? \yiister\grid\widgets\ProgressColumn::STYLE_SUCCESS
: \yiister\grid\widgets\ProgressColumn::STYLE_WARNING;
},
],
I tried this way:
$model->paxtashart
but it is jsut giving me 1 value for all attributes, it is not helping