Beispiel #1
0
 /**
  * Связь с регионами
  * @return \yii\db\ActiveQuery
  */
 public function getRegions()
 {
     return $this->hasMany(Region::className(), ["country_id" => "id"])->published();
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRegions()
 {
     return $this->hasMany(Region::className(), ['pais_id' => 'id']);
 }
Beispiel #3
0
 /**
  * Связь с регионом
  * @return \yii\db\ActiveQuery
  */
 public function getRegion()
 {
     return $this->hasOne(Region::className(), ["id" => "region_id"]);
 }
Beispiel #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRegion()
 {
     return $this->hasOne(Region::className(), ['id' => 'region_id']);
 }