これは私のグリッドビューです。クラスactionColumn
から次のように変更しました:
[ '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 '';
},
],
エラーが発生します。
Method Not Allowed (#405)
Method Not Allowed. This url can only handle the following request methods: POST.
再度変更するとactionColumn
機能していましたが、コードを変更したところエラーが発生しました。