public function afterFind() { if ($this->site_id) { $this->type = 'site'; } elseif ($this->subspecialty_id) { $this->type = 'subspecialty'; } elseif ($this->firm_id) { $this->type = 'firm'; } }