darbaoui / laravel-ui-avatars
generate an avatar image based on the name, size and background color and more
Installs: 6 849
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.2
Requires (Dev)
- orchestra/testbench: ~3.8.0 || ^4.0 || ^5.0 || ^6.0
- phpunit/phpunit: ^7.0 || ^8.0 || ^9.0
README
Installation
This package requires Laravel 5.4 or higher.
- You can install the package via composer:
composer require darbaoui/laravel-ui-avatars
Usage
use Darbaoui\Avatar\Facades\Avatar; // simple avatar Avatar::name('imad darbaoui') ->background('ffd1bf') ->color('ff4500')->get(); // avatar = https://ui-avatars.com/api/?name=imad+darbaoui&background=ffd1bf&color=ff4500 // you can chain any other method if you want to add other parameters to your avatar Avatar::name('imad darbaoui') ->size(124) ->rounded() ->uppercase(false) ->svg() ->background('ffd1bf') ->color('ff4500')->get(); // avatar = https://ui-avatars.com/api/?size=124&rounded=1&uppercase=0&format=svg&name=imad+darbaoui&background=ffd1bf&color=ff4500