Phill Sparks

Fork me on GitHub

Gravitas Bundle

Basic Gravatar support for Laravel.

Installation

Install via the Artisan CLI:

php artisan bundle:install gravitas

Or download the zip and unpack into your bundles directory.

Bundle Registration

Add the following to your application/bundles.php file:

'gravitas' => array(
	'autoloads' => array(
		'map' => array(
			'Gravitas\\API' => '(:bundle)/api.php',
		),
	),
),

Guide

Get a Gravatar URL

Gravitas\API::url('me@phills.me.uk', 120);

Get the HTML for a Gravatar image

Gravitas\API::image('me@phills.me.uk', null, 'Phill Sparks');

Configure

You can configure the size, rating and default image in config/default.php. Full documentation is included in the config file.