Download the PHP package sampic/laravel-adorableavatars without Composer
On this page you can find all versions of the php package sampic/laravel-adorableavatars. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sampic/laravel-adorableavatars
More information about sampic/laravel-adorableavatars
Files in sampic/laravel-adorableavatars
Package laravel-adorableavatars
Short Description Laravel extension allowing you to generate an avatar based on the site http://avatars.adorable.io/
License MIT
Homepage https://github.com/SampicBE/laravel-adorable-avatars
Informations about the package laravel-adorableavatars
Installation
Update your composer.json
file to include this package as a dependency
This package supports the package discovery functionality provided in Laravel 5.5, so registering the classes as described below is no longer necessary if you use Laravel 5.5.
Register the Adorable Avatars service provider by adding it to the providers array in the config/app.php
file.
Alias the Adorable Avatars facade by adding it to the aliases array in the config/app.php
file.
Configuration (optionnal !)
Update the config file to specify this size by default.
Default configuration :
- (boolean)
hash_string
(default: true): Hide the content that allows you to generate your avatar - (boolean)
secure_url
(default: true): allows to use the API in https - (integer)
size
: (default: 80) the default size of the generated avatar
Usage
AdorableAvatars::src(string string, int $size = null)
Returns the URL of the image that has been generated thanks to the character string Can optionally pass in the size required as an integer. The size will be contained within a range between 1 - 512 as avatar will no return sizes greater than 512 of less than 1