2017 © Pedro Peláez
 

library gravatar

Gravatar Package for Laravel 5.6

image

parsidev/gravatar

Gravatar Package for Laravel 5.6

  • Tuesday, March 13, 2018
  • by parsidev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel Gravatar

Gravatar Package for Laravel 5.6, (*1)

installation

For install this package Edit your project's composer.json file to require parsidev/gravatar5.0, (*2)

"require": {
    "parsidev/gravatar": "5.6.x-dev"
},

Now, update Composer:, (*3)

composer update

Once composer is finished, you need to add the service provider. Open config/app.php, and add a new item to the providers array., (*4)

'Parsidev\Gravatar\GravatarServiceProvider',

Next, add a Facade for more convenient usage. In config/app.php add the following line to the aliases array:, (*5)

'Gravatar'  => 'Parsidev\Gravatar\Facades\Gravatar',

Publish config files:, (*6)

php artisan vendor:publish

Usage

Gravatar::exists($email)

Returns a boolean telling if the given $email has got a Gravatar., (*7)

Gravatar::saveImage($email, $destination, $size=null, $rating=null)

Download gravatar, (*8)

Gravatar::src($email, $size = null, $rating = null)

Returns the https URL for the Gravatar of the email address specified. Can optionally pass in the size required as an integer. The size will be contained within a range between 1 - 512 as gravatar will no return sizes greater than 512 of less than 1


<img src="{{ Gravatar::src('info@parsidev.ir') }}">


<img src="{{ Gravatar::src('info@parsidev.ir', 200) }}">


<img src="{{ Gravatar::src('info@parsidev.ir', 1024) }}" width=1024>
Gravatar::image($email, $alt = null, $attributes = array(), $rating = null)

Returns the HTML for an <img> tag

echo Gravatar::image('info@parsidev.ir');

// Show image at 200px
echo Gravatar::image('info@parsidev.ir', 'Some picture', array('width' => 200, 'height' => 200));

// Show image at 512px scaled in HTML to 1024px
echo Gravatar::image('info@parsidev.ir', 'Some picture', array('width' => 1024, 'height' => 1024));

The Versions

13/03 2018

5.6.x-dev

5.6.9999999.9999999-dev

Gravatar Package for Laravel 5.6

  Sources   Download

The Requires

 

by Mohammad Reza

10/02 2017

v5.4.x-dev

5.4.9999999.9999999-dev

Gravatar Package for Laravel 5.4

  Sources   Download

The Requires

 

by Mohammad Reza

10/02 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Mohammad Reza

12/03 2016

5.2.x-dev

5.2.9999999.9999999-dev

  Sources   Download

The Requires

 

by Mohammad Reza