belongsTo('Client'); } public function lastLogin() { if ($this->last_login == '0000-00-00 00:00:00') { return '---'; } else { return $this->last_login; } } public function getFullName() { $fullName = $this->first_name . ' ' . $this->last_name; if ($fullName == ' ') { return "Unknown"; } else { return $fullName; } } }