PHP code example of christofferok / laravel-emojione

1. Go to this page and download the library: Download christofferok/laravel-emojione 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/ */

    

christofferok / laravel-emojione example snippets


Comment::create([
  'content' => LaravelEmojiOne::toShort(request('content'))
]);

@emojione($comment->content)

'imagePathPNG' => '/vendor/emojione/png/64/',

'sprites' => true,
'spriteSize' => 32, // 32 or 64
 php
ChristofferOK\LaravelEmojiOne\LaravelEmojiOneServiceProvider::class,
 php
'LaravelEmojiOne' => ChristofferOK\LaravelEmojiOne\LaravelEmojiOneFacade::class,
 php
LaravelEmojiOne::toShort($str); // - native unicode -> shortnames
LaravelEmojiOne::shortnameToImage($str); // - shortname -> images
LaravelEmojiOne::unicodeToImage($str); // - native unicode -> images
LaravelEmojiOne::toImage($str); // - native unicode + shortnames -> images (mixed input)