1. Go to this page and download the library: Download xuejd3/laravel-emoji library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xuejd3 / laravel-emoji example snippets
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);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.