unicodeveloper / laravel-emoji

:package: :yum: Laravel 5 Package that harnesses the power of PHP 7 unicode features to provide emojis in your laravel app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emoji

barkotenicholas opened this issue · comments

It doenot recognize all emojis

It's late but for future users:

go to this address : your_root_path/vendor/unicodeveloper/laravel-emoji/src/ and edit emoji.php file;

File have to be like this :

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Emoji Emoticons and their Unicode equivalents
    |--------------------------------------------------------------------------
    | Get the Emoji code from http://www.emoji-cheat-sheet.com/
    | and get its equivalent from http://unicode.org/emoji/charts/full-emoji-list.html
    |
    | Contribute, let's make our laravel apps more emojified
    |
    */

    "grinning"                  => "\u{1F600}",
    "grin"                      => "\u{1F601}",
    "joy"                       => "\u{1F602}",
    "smiley"                    => "\u{1F603}",
    "smile"                     => "\u{1F604}",
    "sweat_smile"               => "\u{1F605}",
    "laughing"                  => "\u{1F606}",
    "wink"                      => "\u{1F609}",
    "blush"                     => "\u{1F60A}",
    "yum"                       => "\u{1F60B}",
    "sunglasses"                => "\u{1F60E}",
    "heart_eyes"                => "\u{1F60D}",
    "kissing_heart"             => "\u{1F618}",
    "kissing"                   => "\u{1F617}",
    "kissing_smiling_eyes"      => "\u{1F619}",
    "kissing_closed_eyes"       => "\u{1F61A}",
    "relaxed"                   => "\u{263A}",

Then add your custom emojies to this file. You can choose your emojies from http://unicode.org/emoji/charts/full-emoji-list.html

In my case I did:

.
.
.
    "kissing_smiling_eyes"      => "\u{1F619}",
    "kissing_closed_eyes"       => "\u{1F61A}",
    "relaxed"                   => "\u{263A}",

    //My Own Emojies
    "star_eyes"                 => "\u{1F929}",
    "dollar_eyes"               => "\u{1F911}",
    "damaged"                   => "\u{1F915}"

And finally call them using Emoji::findByAlias("damaged");