public function actionBlog_post_delete() { $post = Yii::$app->request->post(); if (Blog::checkPermission($post['article_id'])) { if (Blog::DeleteArticle($post['article_id'])) { Blog::DeleteAllToArticle($post['article_id']); } return $this->redirect('/id' . Yii::$app->user->getId() . '/blog/all'); } else { echo json_encode(['status' => 0]); } }