This is my gridview, I changed from class actionColumn
to this:
[ 'format' => 'html',
'contentOptions'=>['style'=>'width: 5px;'],
'value' => function($model) {
if($model->id == Yii::$app->user->identity->id) {
return Html::a('<i class="glyphicon glyphicon-share-alt"></i>').' '.
Html::a('<i class="glyphicon glyphicon-pencil"></i>', ['update', 'id' => $model->id]).' '.
Html::a('<i class="glyphicon glyphicon-trash"></i>', ['delete', 'id' => $model->id], ['data' => ['confirm' => 'Do you really want to delete this element?','method' => 'post']]);
}
return '';
},
],
Which gives me an error.
Method Not Allowed (#405)
Method Not Allowed. This url can only handle the following request methods: POST.
When I changed to actionColumn
again it was working, but I changed the code and it just gives me an error.