first_name} {$this->last_name}"; } /** * Returns the user Gravatar image url. * * @return string */ public function gravatar() { // Generate the Gravatar hash $gravatar = md5(strtolower(trim($this->gravatar))); // Return the Gravatar url return "//gravatar.org/avatar/{$gravatar}"; } public function assetcount() { return DB::table('assets')->where('assigned_to', $this->id)->count(); } public function userassetlist() { return DB::table('assets')->where('assigned_to', $this->id)->get(); } }