/** * @return \yii\db\ActiveQuery */ public function getPostComments() { return $this->hasMany(PostComment::className(), ['comment_post_id' => 'id']); }
public function getComment() { return $this->hasOne(PostComment::className(), ['id' => 'target_id']); }