/**
  * Lists all PostComment models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => PostComment::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
 /**
  * Displays a single Post model.
  * @param integer $id
  * @return mixed
  */
 public function actionView($id)
 {
     $comment = new PostComment();
     $comment->post_id = $id;
     return $this->render('view', ['model' => $this->findModel($id), 'comment' => $comment, 'commentsDataProvider' => new ActiveDataProvider(['query' => PostComment::find()->where(['post_id' => $id])])]);
 }