Commit 7468516d authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлено удаление записи

parent a0bdf3da
...@@ -150,7 +150,11 @@ class CasesAdminController extends AdminController { ...@@ -150,7 +150,11 @@ class CasesAdminController extends AdminController {
]); ]);
} }
/**
* @param $id
* @return string|\yii\web\Response
* @throws \Exception
*/
public function actionUpdate($id) public function actionUpdate($id)
{ {
$model = $this->findModel($id); $model = $this->findModel($id);
...@@ -235,6 +239,17 @@ class CasesAdminController extends AdminController { ...@@ -235,6 +239,17 @@ class CasesAdminController extends AdminController {
]); ]);
} }
/**
* @param $id
* @return \yii\web\Response
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['manage']);
}
/** /**
* Finds the CoContent model based on its primary key value. * Finds the CoContent model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown. * If the model is not found, a 404 HTTP exception will be thrown.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment