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