Avatar Component for Orchestra Platform
PHP
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
resources/config
src
tests
.coveralls.yml
.gitattributes
.gitignore
.php_cs
.scrutinizer.yml
.travis.yml
CHANGELOG.md
LICENSE
README.md
composer.json
phpunit.xml

README.md

Avatar Component for Orchestra Platform

Avatar Component provide support for driver based avatar provider for your Laravel, PHP or Orchestra Platform application.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status

Table of Content

Version Compatibility

Laravel Avatar
4.x.x 2.x.x
5.0.x 3.0.x
5.1.x 3.1.x
5.2.x 3.2.x
5.3.x 3.3.x
5.4.x 3.4.x
5.5.x 3.5.x
5.6.x 3.6.x
5.7.x 3.7.x@dev

Installation

To install through composer, simply put the following in your composer.json file:

{
    "require": {
        "orchestra/avatar": "~3.0"
    }
}

And then run composer install to fetch the package.

Quick Installation

You could also simplify the above code by using the following command:

composer require "orchestra/avatar=~3.0"

Configuration

Add Orchestra\Avatar\AvatarServiceProvider service provider in config/app.php.

'providers' => [

    // ...

    Orchestra\Avatar\AvatarServiceProvider::class,
],

You might also want to add Orchestra\Support\Facades\Avatar to class aliases in config/app.php:

'aliases' => [

    // ...

    'Avatar' => Orchestra\Support\Facades\Avatar::class,
],

Usage

You can easily display an avatar by passing a User instance.

<?php

$user = User::find(1);

$avatar = Avatar::user($user)->render();