2017 © Pedro Peláez
 

library laravel-gravatar

Uses the authorized users email to display their Gravatar as an image

image

darovi/laravel-gravatar

Uses the authorized users email to display their Gravatar as an image

  • Friday, November 11, 2016
  • by danrovito
  • Repository
  • 1 Watchers
  • 4 Stars
  • 163 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Laravel Gravatar

Latest Stable Version Total Downloads License StyleCI, (*1)

Laravel Gravatar is a simple Laravel package that displays a registered users Gravatar based on their email address in your users table. If the user does not have a registered gravatar it will show the default mystery man., (*2)

Mystery Man, (*3)

Installation

Via Composer, (*4)

composer require danrovito/laravel-gravatar, (*5)

Usage

Use Gravatar in your User model., (*6)

<?php

namespace App;

use Darovi\Gravatar;
use Illuminate\Database\Eloquent\Model;

class User extends Model
{
  use Gravatar;

  // ...
}

You can also control what attribute should be treated as the email address (instead of email) by overriding the emailAttributeName() method:, (*7)

<?php

namespace App;

use Darovi\Gravatar;
use Illuminate\Database\Eloquent\Model;

class User extends Model
{
  use Gravatar;

  protected function emailAttributeName()
  {
    return 'your_email_column';
  }

  // ...
}

Then in your view wherever you want to use the Gravatar, (*8)

<img src="{{ Auth::user()->gravatar }}">

License

Laravel Slack Invite is open-sourced software licensed under the MIT license, (*9)

Bug Reporting and Feature Requests

Please add as many details as possible regarding submission of issues and feature requests, (*10)

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*11)

The Versions

11/11 2016

dev-master

9999999-dev

Uses the authorized users email to display their Gravatar as an image

  Sources   Download

MIT

by Dan Rovito

11/11 2016

dev-analysis-z9RMNm

dev-analysis-z9RMNm

Uses the authorized users email to display their Gravatar as an image

  Sources   Download

MIT

by Dan Rovito

11/09 2016

1.3.1

1.3.1.0

Uses the authorized users email to display their Gravatar as an image

  Sources   Download

MIT

by Dan Rovito

11/09 2016

1.3

1.3.0.0

Uses the authorized users email to display their Gravatar as an image

  Sources   Download

MIT

by Dan Rovito

08/09 2015

1.0.0

1.0.0.0

Uses the authorized users email to display their Gravatar as an image

  Sources   Download

MIT

by Dan Rovito