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