public function actionDelete($id) { $model = ArticleComment::findOne($id); $model->delete(); return $this->redirect(['index']); }
/** * @return \yii\db\ActiveQuery */ public function getArticleComments() { return $this->hasMany(ArticleComment::className(), ['article_item_id' => 'item_id']); }