kregel/identicon
371
4
| Install | |
|---|---|
composer require kregel/identicon |
|
| Latest Version: | v1.0.3 |
| PHP: | >=5.4.0 |
| Last Updated: | Oct 10, 2016 |
| Links: | GitHub · Packagist |
Maintainer: austinkregel
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/identiconor add"kregel/identicon":"dev-master"to your composer.json file, just be sure to usecomposer updatewith that statement, or if you haven't build your dependancies usecomposer installinstead. -
Register the service provider with your
config/app.phpfile
'providers' => [
...,
Kregel\Identicon\IdenticonServiceProvider::class,
...,
]
- Add the alias to your
config/app.phpfile
'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. :)