PHP code example of digitonic / laravel-gravatar

1. Go to this page and download the library: Download digitonic/laravel-gravatar library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

digitonic / laravel-gravatar example snippets


Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider::class

'aliases' => [
     'Gravatar' => Thomaswelton\LaravelGravatar\Facades\Gravatar::class
]

// Show image with default dimensions
echo Gravatar::image('[email protected]');

// Show image at 200px
echo Gravatar::image('[email protected]', 'Some picture', ['width' => 200, 'height' => 200]);

// Show image at 512px scaled in HTML to 1024px
echo Gravatar::image('[email protected]', 'Some picture', ['width' => 1024, 'height' => 1024]);

php artisan vendor:publish --provider="Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider"