rdpascua/laravel-identicon

Identicon wrapper for Laravel

Installs: 115

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 3

Open Issues: 0

pkg:composer/rdpascua/laravel-identicon

1.0.0 2017-06-28 18:13 UTC

This package is auto-updated.

Last update: 2025-10-13 17:01:31 UTC


README

Generate awesome avatar placeholders using identicon.

Installation

composer require rdpascua/laravel-identicon

Add this to your service provider

Rdpascua\Identicon\IdenticonServiceProvider::class,

And add this to your facades

'aliases' => [
    'Identicon' => Rdpascua\Identicon\Facades\Identicon::class,
]

Usage

Identicon::getImageDataUri($string, $size = 64, $color = null)

Returns a base64 image.

<!-- Base64 URI image -->
<img src="{{ Identicon::getImageDataUri('baz') }}">

<!-- Explicitly specify the size and color -->
<img src="{{ Identicon::getImageDataUri('foo', 256, 'B4D455') }}">

Identicon::image($string, $size = 64, $color = null)

Returns a base64 image wrapped in <img> tag.

<!-- Show image -->
{{ Identicon::image('baz') }}

Identicon::getImageData($string, $size = 64, $color = null)

Identicon::displayImage($string, $size = 64, $color = null)

Credits

License

This wrapper is licensed under the MIT license