Package

Creativeorange Gravatar

A Laravel Gravatar package for retrieving gravatar image URLs or checking the existance of an image.

Package

creativeorange/gravatar

View on GitHub →

Gravatar for Laravel 5 - 10

The creativeorange/gravatar package is a convenient Laravel integration for working with Gravatar - a service that provides globally recognized avatars. Designed to be compatible with Laravel versions 5 through 10, this package simplifies the process of fetching Gravatar images associated with email addresses.

Key Features

  • Fetch Gravatar Images: Easily retrieve the URL to the Gravatar image for any email.
  • Default Image Fallbacks: Specify a default image in cases where no Gravatar exists for the given email.
  • Check Existence: Verify the presence of a Gravatar for a particular email.
  • Customizable: Modify Gravatar size, fallback image, security settings, and more through configuration.
  • Multiple Configuration Profiles: Supports multiple preset configurations for different use cases.

Installation

  1. Via Composer:

    composer require creativeorange/gravatar ~1.0
    
  2. Service Provider:

    • For Laravel 5.3 and below, add to app/config/app.php:
      'providers' => [
          'Creativeorange\Gravatar\GravatarServiceProvider'
      ];
      
    • For Laravel 5.4 and above, use config/app.php:
      'providers' => [
          Creativeorange\Gravatar\GravatarServiceProvider::class
      ];
      
  3. Facade Alias (Optional):

    • For Laravel 5.3 and below:
      'aliases' => [
          'Gravatar' => 'Creativeorange\Gravatar\Facades\Gravatar',
      ];
      
    • For Laravel 5.4 and above:
      'aliases' => [
          'Gravatar' => Creativeorange\Gravatar\Facades\Gravatar::class,
      ];
      
  4. Publish Configuration:

    php artisan vendor:publish
    

Usage

  • Retrieve a Gravatar URL:

    Gravatar::get('email@example.com');
    
  • Check for Gravatar Existence:

    Gravatar::exists('email@example.com');
    
  • Use a Custom Fallback Image:

    Gravatar::fallback('http://urlto.example.com/avatar.jpg')->get('email@example.com');
    
  • Specify Configuration on-the-fly:

    Gravatar::get('email@example.com', 'small-secure');
    Gravatar::get('email@example.com', ['size'=>200]);
    

This package offers a streamlined way to integrate Gravatar functionality into your Laravel applications, enhancing your user profiles with globally recognized avatars. Configurable and easy to use, it fits well within the Laravel ecosystem.

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum