New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

taskforcedev/gravatar

Gravatar Module.
235
Install
composer require taskforcedev/gravatar
Latest Version:v1.0.0
License:GPL-3.0
Last Updated:Aug 25, 2016
Links: GitHub  ·  Packagist
Maintainer: PrivateSniper

Gravatar

A simple gravatar class.

Installation

Step 1: Add the following package to your composer.json.

require {
  "taskforcedev/gravatar": "1.0.*",
}

Step 2: Run composer update.

composer update

Usage

Using the class is as very straightforward.

Example

use Taskforcedev\Gravatar;

$gravatar = new Gravatar();

$avatar = $gravatar->getAvatar($user, $options);

$user can be any of the following:

  • An array with a key containing the email address.
  • A Laravel User object.
  • A class with a getEmail() method or email property.

$options is optional

  • $options['secure'] - By default this is true for https but can also be set to false for http.
  • $options['size'] - Defaults to 100 (px), accepts any int value.

Exceptions

If for any reason the class fails to retrieve a gravatar false will be returned.

Related Packages

forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

41,539 43
foinikas/gravatar

A fast way to create Gravatars using Laravel framework

610 0
dionbosschieter/gravatar

Simple transformer to get a gravatar url on a User model

92 0
creativeorange/gravatar

A Laravel Gravatar package for retrieving gravatar image URLs or checking the ex...

8,669,128 545
elfsundae/laravel-gravatar

The easiest way to generate Gravatar avatar URL.

9,689 38

Version History

Version Released License
v1.0.0 GPL-3.0