public function actionMatchdelete($id) { $model = IntCorrelation::findOne($id); if ($model === null) { throw new \yii\web\HttpException(404, 'The requested page does not exist.'); } $model->delete(); $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('dispmatch')); }