/**
  * @inheritdoc
  */
 public function getLocation()
 {
     return $this->hasOne(Location::className(), ['id' => 'location_id']);
 }
Beispiel #2
0
 /**
  * 
  * @return yii\db\ActiveQuery
  */
 public function getLocations()
 {
     return $this->hasMany(Location::className(), ['region_id' => 'id']);
 }