public function actionAudit($id)
    {
        $model = $this->findModel($id);
        $model->setPublished();
        Yii::$app->getSession()->setFlash('success', Yii::t('article', 'Update success.'));
        return $this->redirect(Url::previous('actions-redirect'));
    }
public function actionAudit($id)
    {
        $model = $this->findModel($id);
        $model->setPublished();
        Yii::$app->getSession()->setFlash('success', Yii::t('article', 'Update success.'));
        return $this->redirect(Url::previous('actions-redirect'));
    }
public function actionAudit ( $ id ) { $ model = $ this -> findModel ( $ id ) ; $ model -> setPublished ( ) ; Yii :: $ app -> getSession ( ) -> setFlash ( 'success' , Yii :: t ( 'article' , 'Update success.' ) ) ; return $ this -> redirect ( Url :: previous ( 'actions-redirect' ) ) ; }
Audit an existing Comment model.
If Audit is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
Audit an existing Comment model . If Audit is successful the browser will be redirected to the index page .