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