<?php $form = ActiveForm::begin([
'enableClientValidation' => true,
'options' => [
'enctype' => 'multipart/form-data',
],
]); ?>
public function actionDelete($id)
{
$model = $this->findModel($id);
$model->delete();
return $this->renderAjax('my_view', ['models' => $model]);
}