Example #1
0
 public function getChildrenCategory()
 {
     return $this->hasMany(Category::className(), ['parent_id' => 'category_id']);
 }
Example #2
0
 public function getCategory()
 {
     return $this->hasOne(Category::className(), ['category_id' => 'category_id']);
 }