Package Data | |
---|---|
Maintainer Username: | overtrue |
Maintainer Contact: | anzhengchao@gmail.com (overtrue) |
Package Create Date: | 2017-07-22 |
Package Last Update: | 2024-03-13 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:01:16 |
Package Statistics | |
---|---|
Total Downloads: | 32,961 |
Monthly Downloads: | 188 |
Daily Downloads: | 0 |
Total Stars: | 151 |
Total Watchers: | 7 |
Total Forks: | 15 |
Total Open Issues: | 3 |
$ composer require overtrue/laravel-emoji
Laravel 5.5 auto-discovery supported.
If you are using < laravel 5.5
Overtrue\LaravelEmoji\EmojiServiceProvider::class,
'Emoji' => Overtrue\LaravelEmoji\Emoji::class,
Emoji::toImage(':smile:'); // <img class="emojione" alt="😄" title=":smile:" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/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 \Emojione\Client instance.
app('emoji');
// or
app(\Emojione\Client::class);
// config
$ php artisan vendor:publish --provider="Overtrue\\LaravelEmoji\\EmojiServiceProvider" --tag=config
// png images
$ php artisan vendor:publish --provider="Overtrue\\LaravelEmoji\\EmojiServiceProvider" --tag=public
// sprites images
$ php artisan vendor:publish --provider="Overtrue\\LaravelEmoji\\EmojiServiceProvider" --tag=sprites
想知道如何从零开始构建 PHP 扩展包?
请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》
MIT