/** * @return \yii\db\ActiveQuery */ public function getBlogs() { return $this->hasMany(Blog::className(), ['category_id' => 'id']); }