PHP code example of vinicius73 / lavatar

1. Go to this page and download the library: Download vinicius73/lavatar 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/ */

    

vinicius73 / lavatar example snippets


    Vinicius73\Lavatar\LavatarServiceProvider::class,

    'Lavatar' => Vinicius73\Lavatar\Facade\LavatarFacade::class,

   $avatar = Lavatar::make($identificator); // Creates standard object (Gravatar|Another)
   $avatar->getUrl(); // Returns the URL of the avatar.
   $avatar->image(); // Returns the image html tag.
   
   $avatar->getUrl($options); // Override the default settings of the object
   
   // @var string $alt      alt img tag
   // @var array $options   Override the default settings of the object
   // @var array $atts      extra img html tags
   $avatar->image($alt,$options,$atts);

   Lavatar::Gravatar('[email protected]')->getUrl();
   Lavatar::Gravatar('[email protected]')->image();

   Lavatar::Twitter('twitterUserName')->getUrl();
   Lavatar::Twitter('twitterOther')->image();

   Lavatar::Instagram('InstagramUserName')->getUrl();
   Lavatar::Instagram('InstagramOther')->image();

   Lavatar::Facebook('FacebookUserName')->getUrl();
   Lavatar::Facebook('FacebookID')->image();

   Lavatar::Minecraft('MinecraftUserName')->getUrl();
   Lavatar::Minecraft('MinecraftUser')->image();
   
   Lavatar::Minecraft('MinecraftUser')->avatar();
   Lavatar::Minecraft('MinecraftUser')->skin();
   Lavatar::Minecraft('MinecraftUser')->helm();