kregel / identicon
Requires
- php: >=5.4.0
- illuminate/support: >=5.0
- yzalis/identicon: ^1.1
This package is auto-updated.
Last update: 2024-10-29 03:58:38 UTC
README
What is it?
This is a Laravel wrapper for the identicon package written by yzalis. This package comes equipped a custom
identicons named route for easy profile image redering. The custom route can be accessed using a named route or by going to
http://YOURDOMAIN.TLD/identicon/d/STRING
where the string is whatever you want...
route('identicon::main', [ 'YOUR STRING HERE', 'SIZE (optional)', 'TEXT_COLOR (optional)', 'BACKGROUND_COLOR (optional)' ]);
How to set up.
-
composer require kregel/identicon
or add"kregel/identicon":"dev-master"
to your composer.json file, just be sure to usecomposer update
with that statement, or if you haven't build your dependancies usecomposer install
instead. -
Register the service provider with your
config/app.php
file
'providers' => [ ..., Kregel\Identicon\IdenticonServiceProvider::class, ..., ]
- Add the alias to your
config/app.php
file
'aliases' => [ ..., 'Identicon' => Kregel\Identicon\Facades\Identicon::class, ..., ]
Use it!
I use this method (similar to Gravatar)
<img src="{{ route('identicon::main', [ md5($user->email), '200' ]) }}">
Questions?
Email me (my email is on my github page), or you can drop an issue. :)