Exemplo n.º 1
0
 public function getSubcategories()
 {
     return $this->hasMany(SubCategory::className(), ['cate_id' => 'id']);
 }
Exemplo n.º 2
0
 public function getSubcategory()
 {
     return $this->hasOne(SubCategory::className(), ['id' => 'scate_id']);
 }