コード例 #1
0
ファイル: Department.php プロジェクト: Arokh09/it-service
 public function getBuildings()
 {
     return $this->hasMany(building::className(), ['department_id' => 'id']);
 }
コード例 #2
0
ファイル: Phonebook.php プロジェクト: Arokh09/it-service
 public function getBuilding()
 {
     return $this->hasOne(building::className(), ['id' => 'building_id'])->via('room');
 }