1. Go to this page and download the library: Download ballen/gravel 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/ */
ballen / gravel example snippets
Ballen\Gravel\GravelServiceProvider::class,
use Ballen\Gravel\Gravatar;
$avatar = new Gravatar('[email protected]');
$avatar->setSize(100); // We want a 100x100px sized avatar instead of the default 120x120px
/**
* You can then obtain the avatar URL either by using the buildGravatarUrl() method or utilising
* the __toString() class method like so:
*/
<image src=" echo $avatar;
# Laravel 4.x example
return View::make('userprofile')
->with('gravatar', Gravatar::make('[email protected]')->size(200)->get());
# Laravel 5.x and 6.x example (using the view() helper method)
return view('userprofile')
->with('gravatar', Gravatar::make('[email protected]')->size(200)->get());
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.