orchestra/avatar

Avatar Component for Orchestra Platform

v6.0.0 2021-04-18 12:30 UTC

README

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

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

Version Compatibility

Installation

To install through composer, run the following command from terminal:

composer require "orchestra/avatar"

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();