Exemplo n.º 1
0
 public function getAttrs()
 {
     return $this->hasMany(Attr::className(), ['category_id' => 'id']);
 }
Exemplo n.º 2
0
 public function getAttr()
 {
     return $this->hasOne(Attr::className(), ['id' => 'attr_id']);
 }