Package Data | |
---|---|
Maintainer Username: | rvish |
Maintainer Contact: | me@rvish.com (Ravi Sharma) |
Package Create Date: | 2017-07-20 |
Package Last Update: | 2017-12-08 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:08:36 |
Package Statistics | |
---|---|
Total Downloads: | 27 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 3 |
Total Watchers: | 2 |
Total Forks: | 3 |
Total Open Issues: | 0 |
An emoji encoder/parser for Laravel 5. This will encode and decode html to unified and vice versa. In order to handle emojies in database where you care about light weight things, performance and don't want to use blob data type.
PHP 5.5+
To get the latest version of rvish Emoji, simply require the project using Composer:
$ composer require rvish/emoji
Instead, you may of course manually update your require block and run composer update
if you so choose:
{
"require": {
"rvish/emoji": "*"
}
}
Once rvish Emoji is installed, you need to register the service provider.
Open up config/app.php
and
Rvish\Emoji\EmojiServiceProvider::class
to the providers
'Emoji' => Rvish\Emoji\Facades\Emoji::class
to the aliases
.For encoding to Bytes (UTF-8)
Emoji::encode("Test1 Test2 💡 Test3"); // encoding to Bytes (UTF-8)
For decoding to Native
Emoji::decode("Test1 Test2 \xf0\x9f\x92\xa1 Test3"); // decoding to Native
We welcome contributions! If you would like to hack on Emoji, please follow these steps:
make check
(ensure it does not error!)Please give us adequate time to review your submission. Thanks!
Rvish Emoji is licensed under The MIT License (MIT).