コード例 #1
0
ファイル: HotelClass.php プロジェクト: kdes70/hotel.lok
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getHotelCategories()
 {
     return $this->hasMany(HotelCategory::className(), ['class_id' => 'id']);
 }
コード例 #2
0
ファイル: Rooms.php プロジェクト: kdes70/hotel.lok
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategory()
 {
     return $this->hasOne(HotelCategory::className(), ['id' => 'category_id']);
 }