orchestra / avatar
Avatar Component for Orchestra Platform
Fund package maintenance!
Liberapay
paypal.me/crynobone
Installs: 112 420
Dependents: 3
Suggesters: 1
Security: 0
Stars: 8
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: ^7.3 || ^8.0
- orchestra/support: ^6.0
Requires (Dev)
- orchestra/testbench: ^6.17
This package is auto-updated.
Last update: 2024-12-18 20:27:16 UTC
README
Avatar Component provide support for driver based avatar provider for your Laravel, PHP or Orchestra Platform application.
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();