belongsToMany('App\Mailbox'); } /** * Get user role * * @return string */ public function getRole() { return ucfirst($this->role); } /** * Check if user is admin * * @return boolean */ public function isAdmin() { return ($this->role == self::ROLE_ADMIN); } /** * Get user full name * @return string */ public function getFullName() { return $this->first_name . ' ' . $this->last_name; } }