Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getHotel()
 {
     return $this->hasOne(Hotel::className(), ['id' => 'hotel_id']);
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getHotels()
 {
     return $this->hasMany(Hotel::className(), ['city_id' => 'id']);
 }