From eec63d622224830e33523c3cf81a4095287b8cc7 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Wed, 27 Jun 2018 15:02:44 +0300 Subject: [PATCH] delete author --- backend/controllers/AuthorController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/controllers/AuthorController.php b/backend/controllers/AuthorController.php index f6f7ed9..d224708 100644 --- a/backend/controllers/AuthorController.php +++ b/backend/controllers/AuthorController.php @@ -9,7 +9,6 @@ namespace backend\controllers; use artbox\core\admin\actions\Index; - use artbox\core\admin\interfaces\ControllerInterface; use common\models\Author; use yii\filters\AccessControl; use yii\filters\VerbFilter; @@ -101,4 +100,10 @@ throw new NotFoundHttpException('The requested page does not exist.'); } } + + + public function actionDelete($id){ + $this->findModel($id)->delete(); + return $this->redirect(['author/index']); + } } \ No newline at end of file -- libgit2 0.21.4