Example #1
0
 public function getSubcategories()
 {
     return $this->hasMany(ProductCategory::className(), ['product_category_parent_id' => 'product_category_id']);
 }
Example #2
0
 public function getProductCategory()
 {
     return $this->hasOne(ProductCategory::className(), ['product_category_id' => 'product_category_fk']);
 }