irazasyed / laravel-identicon by irazasyed

Laravel Identicon Package - Extends Identicon Library and Adds Support for Seamless Usage with Laravel 4/5.
28,210
22
4
Package Data
Maintainer Username: irazasyed
Maintainer Contact: syed@lukonet.com (Syed I.R)
Package Create Date: 2014-09-07
Package Last Update: 2023-11-14
Home Page: https://bit.ly/laravel-identicon
Language: PHP
License: MIT
Last Refreshed: 2024-04-22 03:03:52
Package Statistics
Total Downloads: 28,210
Monthly Downloads: 86
Daily Downloads: 1
Total Stars: 22
Total Watchers: 4
Total Forks: 7
Total Open Issues: 0

Laravel-Identicon Package

Package for Laravel Latest Version Latest Tag Software License SensioLabsInsight Total Downloads FOSSA Status

Laravel 4/5 Identicon Package - Extends Identicon Library and Adds Support for Seamless Usage with Laravel 4 or 5.

Quick start

Required setup / Installation

You can either add the package directly by firing this command

$ composer require irazasyed/laravel-identicon:~1.1

Or add in the require key of composer.json file manually by add the following

"irazasyed/laravel-identicon": "~1.1"

And Run the Composer update comand

$ composer update

Providers and Aliases

This step is optional for Laravel >= 5.5, where these are auto-discovered.

In your app/config/app.php add 'Irazasyed\LaravelIdenticon\ServiceProvider' to the end of the $providers array

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Irazasyed\LaravelIdenticon\ServiceProvider',

),

At the end of app/config/app.php add 'Identicon' => 'Irazasyed\LaravelIdenticon\Facade' to the $aliases array

'aliases' => array(

    'App'        => 'Illuminate\Support\Facades\App',
    'Artisan'    => 'Illuminate\Support\Facades\Artisan',
    ...
    'Identicon'  => 'Irazasyed\LaravelIdenticon\Facade',

),

Usage

This Package adds Laravel Support to Identicon PHP Library. It simply extends the library as well as optimized for usage with Laravel. So all the methods listed here are available and will work seamlessly.

Example Methods

Generate and Display an identicon image:

Identicon::displayImage('foo');

Generate and get the image data

$imageData = Identicon::getImageData('bar');

Generate and get the base 64 image uri ready for integrate into an HTML img tag. The below example is using blade templating

<img src="{{ Identicon::getImageDataUri('bar') }}" alt="bar Identicon" />

...

And all the other remaining methods from the main library.

License

The MIT License (MIT). Please see License File for more information.

FOSSA Status

Additional information

Any issues, please report here