belongsTo('App\Models\Client'); } public function getPersonType() { return PERSON_CONTACT; } /* public function getLastLogin() { if ($this->last_login == '0000-00-00 00:00:00') { return '---'; } else { return $this->last_login->format('m/d/y h:i a'); } } */ public function getDisplayName() { if ($this->getFullName()) { return $this->getFullName(); } else { return $this->email; } } public function getFullName() { if ($this->first_name || $this->last_name) { return $this->first_name.' '.$this->last_name; } else { return ''; } } }