/** * Archives one comment and renders comment/view */ public function actionArchive() { $id = Yii::$app->request->get('id'); $comment = new Comment(); $comment->archiveComment($id); Yii::$app->session->setFlash('messageArchived'); $this->redirect(Yii::$app->getUrlManager()->createUrl('/comment/view')); }