I wan’t to make a button called change password but I don’t know how ,please help me
and I want the button have a image,
I wan’t to make a button called change password but I don’t know how ,please help me
and I want the button have a image,
Hi,
Yes, you can add columns to grid, see the code bellow will help you
[
'class' => 'yii\grid\ActionColumn',
'template' => '{edit} {view} {delete} {changepass}',
'buttons' => [
'changepass' => function ($url, $model) {
return Html::a('<span class="glyphicon glyphicon-key"></span>', ['user/changepass', 'id' => $model->id], ['title' => Yii::t('app', 'change password'),
]);
},
],
]