Skip to content

Instantly share code, notes, and snippets.

@danrovito
Last active August 29, 2015 14:12
Show Gist options
  • Save danrovito/b657d015805d89e32451 to your computer and use it in GitHub Desktop.
Save danrovito/b657d015805d89e32451 to your computer and use it in GitHub Desktop.
Using Gravatar in Laravel 4
public function getGravatarAttribute()
{
$hash = md5(strtolower(trim($this->attributes['email'])));
return "https://secure.gravatar.com/avatar/$hash?d=mm";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment