public function getAddressMsg() { $school = $this->school ? $this->school->name : ''; $building = $this->building ? $this->building->name : ''; return "{$school} {$building} {$this->room}"; }