2017 © Pedro Peláez
 

library laravel-instantavatar

Create a very pretty random avatars with ease. Package for Laravel

image

vinicius73/laravel-instantavatar

Create a very pretty random avatars with ease. Package for Laravel

  • Sunday, October 4, 2015
  • by vinicius73
  • Repository
  • 2 Watchers
  • 27 Stars
  • 322 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

Laravel - Instant Avatar

Create a very pretty random avatars with ease., (*1)

installation

Add the new required package in your composer.json, (*2)

"vinicius73/laravel-instantavatar": "~1.1"

Run composer update or php composer.phar update., (*3)

After composer command, add new service provider in app/config/app.php :, (*4)

Vinicius73\IAvatar\IAvatarServiceProvider::class,

Now, add new aliases in app/config/app.php., (*5)

'IAvatar' => Vinicius73\IAvatar\Facade\IAvatarFacade::class,

Finally publish the configuration file of the package php artisan vendor:publish, (*6)

Usage

/**
 * Creates the image. Only the first letter will be passed to the image.
 * Ex.:
 * 'My String' -> output My
 * You can change this in the settings
 */
$avatar = IAvatar::random('My String');

/**
 * Save imagem in path
 * You can use `public::` Omit the full address /public
 */
$avatar->save('public::path/to/file.png');

/**
 * Output image in browser
 */
$avatar->display();

```php IAvatar::random('Vinicius')->save('public::avatars/vinicius.png')->display();, (*7)


## Configuration ```php return array( 'width' => 150, 'heigth' => 150, 'fontsize' => 80, // in px 'chars' => 2, // Character limit for every image 'font' => array( // You can register or remove more sources with ease. 'InstantAvatar::Comfortaa-Regular.ttf', 'InstantAvatar::Roboto-Regular.ttf', 'InstantAvatar::Ubuntu-Regular.ttf', 'InstantAvatar::DroidSans.ttf' ), 'overlay' => 'InstantAvatar::glass.png', // A watermark that overlays the image 'flat' => false // Enables the flat mode );

Demo

Default

Instant Avatar, (*8)

Flat

Color based in avatarly, (*9)

Instant Avatar Flat, (*10)

The Versions

04/10 2015

dev-master

9999999-dev

Create a very pretty random avatars with ease. Package for Laravel

  Sources   Download

The Requires

 

by Vinicius Reis

04/10 2015

v1.1.0

1.1.0.0

Create a very pretty random avatars with ease. Package for Laravel

  Sources   Download

The Requires

 

by Vinicius Reis

02/10 2014

v0.4

0.4.0.0

Create a very pretty random avatars with ease.

  Sources   Download

The Requires

 

by Vinicius Reis

19/08 2014

v0.3

0.3.0.0

Create a very pretty random avatars with ease.

  Sources   Download

The Requires

 

by Vinicius Reis