assuming your "ROW-NUMBER" is a valid model value eg id
you an use $model->id if you have mode object
'buttons' => [
'blue' => function ($url, $model, $key) {
return bootstrapButton::widget([
'label' => 'blue',
'id' => 'blue' . **ROW-NUMBER**,
'options' => [
'class' => 'btn-lg btn-dark votebtn',
'data-vote' => 1,
'data-row' => $model->id
]
]);
},
'red' => function($url, $model, $key) {
return bootstrapButton::widget([
'label' => 'red',
'id' => 'red' . **ROW-NUMBER**,
'options' => [
'class' => 'btn-lg btn-dark votebtn',
'data-vote' => -1,
'data-row' => $model->id
]
]);
}
],
or use $model['id'] if you have an array
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…