Beispiel #1
0
 public function getItems()
 {
     return $this->hasMany(Items::className(), ['id' => 'item_id'])->viaTable('{{%zoo_items_categories}}', ['category_id' => 'id']);
 }
Beispiel #2
0
 public function getItems()
 {
     return $this->hasMany(Items::className(), ['app_id' => 'id'])->inverseOf('app')->where([Items::tablename() . '.state' => 1]);
 }