π This package assist you in getting started with emoji easily.
$ composer require xuejd3/laravel-emoji
Laravel auto-discovery supported.
If you are using < laravel 5.5
Xuejd3\LaravelEmoji\EmojiServiceProvider::class,
'Emoji' => Xuejd3\LaravelEmoji\Emoji::class,
Emoji::toImage(':smile:'); // <img class="joypixels" alt="😄" title=":smile:" src="https://cdn.jsdelivr.net/joypixels/assets/5.0/png/unicode/32/1f604.png">
Emoji::toShort('π'); // :smile:
Emoji::shortnameToUnicode(':smile:'); // π
// using helper
// default transform shorname to unicode, you can change it in config file.
emoji(':smile:'); // π
// access emoji services, return \JoyPixels\Client instance.
app('emoji');
// or
app(\JoyPixels\Client::class);
// config
$ php artisan vendor:publish --provider="Xuejd3\\LaravelEmoji\\EmojiServiceProvider"
MIT