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 'Guest'; } else { return $fullName; } } public function getDetails() { $str = ''; if ($this->first_name || $this->last_name) { $str .= '' . $this->first_name . ' ' . $this->last_name . '
'; } if ($this->email) { $str .= '' . HTML::mailto($this->email, $this->email) . '
'; } if ($this->phone) { $str .= '' . $this->phone; } if ($str) { $str = '

' . $str . '

'; } return $str; } }