Identicon Wrapper for Laravel
Generate awesome avatar placeholders using identicon., (*1)
Installation
composer require rdpascua/laravel-identicon
Add this to your service provider, (*2)
Rdpascua\Identicon\IdenticonServiceProvider::class,
And add this to your facades, (*3)
'aliases' => [
'Identicon' => Rdpascua\Identicon\Facades\Identicon::class,
]
Usage
Identicon::getImageDataUri($string, $size = 64, $color = null)
Returns a base64 image., (*4)
<img src="{{ Identicon::getImageDataUri('baz') }}">
<img src="{{ Identicon::getImageDataUri('foo', 256, 'B4D455') }}">
Identicon::image($string, $size = 64, $color = null)
Returns a base64 image wrapped in <img>
tag., (*5)
<!-- Show image -->
{{ Identicon::image('baz') }}
Identicon::getImageData($string, $size = 64, $color = null)
Identicon::displayImage($string, $size = 64, $color = null)
Credits
- https://github.com/yzalis/Identicon
License
This wrapper is licensed under the MIT license, (*6)