PHPackages                             christofferok/laravel-emojione - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. christofferok/laravel-emojione

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

christofferok/laravel-emojione
==============================

Laravel helper for EmojiOne

5.1.0(3y ago)139115.8k↓33.3%19[2 PRs](https://github.com/christofferok/laravel-emojione/pulls)MITPHPPHP ~5.6|~7.0|~8.0CI failing

Since Feb 16Pushed 3y ago5 watchersCompare

[ Source](https://github.com/christofferok/laravel-emojione)[ Packagist](https://packagist.org/packages/christofferok/laravel-emojione)[ Docs](https://github.com/christofferok/LaravelEmojiOne)[ RSS](/packages/christofferok-laravel-emojione/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (19)Used By (0)

laravel-emojione [![❤️](https://camo.githubusercontent.com/572173bf702e1b4babd3e59aa4b713738375e9f5ecf6caf16135e7b8989d6c92/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f323736342e706e67)](https://camo.githubusercontent.com/572173bf702e1b4babd3e59aa4b713738375e9f5ecf6caf16135e7b8989d6c92/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f323736342e706e67)
========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#laravel-emojione-)

[![Latest Version on Packagist](https://camo.githubusercontent.com/038671aaa2c2e5f4d9ee0a3fde98605208dee120f247697a94c99ab160ae493c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368726973746f666665726f6b2f6c61726176656c2d656d6f6a696f6e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/christofferok/laravel-emojione)[![Total Downloads](https://camo.githubusercontent.com/71b66be3ec5904fc3054638e20b102ce421bfabf86fdb18d19ad750094af9412/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368726973746f666665726f6b2f6c61726176656c2d656d6f6a696f6e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/christofferok/laravel-emojione)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

[![😀](https://camo.githubusercontent.com/e03e4558e51d42399ce4df041a741bb80af3d204f382fe9c67df2683ce4bc950/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f31663630302e706e67)](https://camo.githubusercontent.com/e03e4558e51d42399ce4df041a741bb80af3d204f382fe9c67df2683ce4bc950/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f31663630302e706e67) [![🏋🏼](https://camo.githubusercontent.com/28ca3e5d1f360a8cdaad817b924c200242106fb32b3af6800092747373bdfb69/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f31663363622d31663366632e706e67)](https://camo.githubusercontent.com/28ca3e5d1f360a8cdaad817b924c200242106fb32b3af6800092747373bdfb69/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f31663363622d31663366632e706e67) [![❤️](https://camo.githubusercontent.com/572173bf702e1b4babd3e59aa4b713738375e9f5ecf6caf16135e7b8989d6c92/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f323736342e706e67)](https://camo.githubusercontent.com/572173bf702e1b4babd3e59aa4b713738375e9f5ecf6caf16135e7b8989d6c92/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f323736342e706e67) [![☮](https://camo.githubusercontent.com/6f805db35d62a8f367fa8ef29c295af72db2de5d6b4c448f421eb4a6f5e5d5c3/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f323632652e706e67)](https://camo.githubusercontent.com/6f805db35d62a8f367fa8ef29c295af72db2de5d6b4c448f421eb4a6f5e5d5c3/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f323632652e706e67)

Laravel package to make it easier working with the gorgeous emojis from [EmojiOne](https://emojione.com/).

Remember to read the [EmojiOne Free License](https://www.emojione.com/licenses/free) and provide the appropriate attribution. Or buy a [premium license](https://www.emojione.com/licenses/premium)

Upgrading from 3.x to 4.x
-------------------------

[](#upgrading-from-3x-to-4x)

1. Update your composer dependency to: `"christofferok/laravel-emojione": "^4.0"` and run `composer update`
2. Update `config/emojione.php` (if you have one) with `'emojiVersion' => '4.0'`

If you are serving the assets yourself then you need to do the following things:

1. Update your emojione/assets composer dependency to: `"emojione/assets": "^4.0"` and run `composer update`
2. Update `config/emojione.php` with the correct paths and versions
3. Publish the assets again. See "Assets" section further down

EmojiOne 4.x/3.x vs 2.0
-----------------------

[](#emojione-4x3x-vs-20)

EmojiOne made a lot of changes in their licensing and which resources are provided in the free license. v2 code is still available in the [emojione-v2](https://github.com/christofferok/laravel-emojione/tree/emojione-v2) branch. If you are upgrading this package, be aware that the SVG assets are not available anymore.

Install
-------

[](#install)

Via Composer

```
$ composer require christofferok/laravel-emojione
```

**If you are on Laravel 5.4 or lower you need to add the following to your `config/app.php` file:**

Add the ServiceProvider to the providers array in `config/app.php`

```
ChristofferOK\LaravelEmojiOne\LaravelEmojiOneServiceProvider::class,
```

Add this to the aliases array in `config/app.php`

```
'LaravelEmojiOne' => ChristofferOK\LaravelEmojiOne\LaravelEmojiOneFacade::class,
```

Config:

```
$ php artisan vendor:publish --tag=config --provider="ChristofferOK\LaravelEmojiOne\LaravelEmojiOneServiceProvider"
```

Usage
-----

[](#usage)

```
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)
```

Blade (equivalent to `LaravelEmojiOne::toImage($str)`):

`@emojione(':smile:')` -&gt; [![😀](https://camo.githubusercontent.com/d86370b5510bd2401a16b1723f23b05ec112ea18ecb98df4fd09d04ce9375caa/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f36342f31663630302e706e67)](https://camo.githubusercontent.com/d86370b5510bd2401a16b1723f23b05ec112ea18ecb98df4fd09d04ce9375caa/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f36342f31663630302e706e67)

`@emojione(':smile: ❤️')` -&gt; [![😀](https://camo.githubusercontent.com/e03e4558e51d42399ce4df041a741bb80af3d204f382fe9c67df2683ce4bc950/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f31663630302e706e67)](https://camo.githubusercontent.com/e03e4558e51d42399ce4df041a741bb80af3d204f382fe9c67df2683ce4bc950/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f31663630302e706e67)[![❤️](https://camo.githubusercontent.com/572173bf702e1b4babd3e59aa4b713738375e9f5ecf6caf16135e7b8989d6c92/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f323736342e706e67)](https://camo.githubusercontent.com/572173bf702e1b4babd3e59aa4b713738375e9f5ecf6caf16135e7b8989d6c92/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f656d6f6a696f6e652f6173736574732f342e302f706e672f3132382f323736342e706e67)

🚨 The output is not escaped so be careful with what you pass into `@emojione`.

More details about how `toImage($str)` works can be found at

### Example

[](#example)

You want to let users put emoji a comment. When you are saving a comment, you might want to run the content through `LaravelEmojiOne::toShort($str)` to convert `😄` and other emoji to `:smile:` etc.

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

So if someone leaves a comment like `This is an awesome comment 😄🔥` it will be saved as `This is an awesome comment :smile: :fire:`

In your view where you display your comments you can use

```
@emojione($comment->content)
```

and that will convert `:smile:` and `😄` to the emojione equivalent.

Assets
------

[](#assets)

By default it will use the assets from JSDelivr.

Remember to run this before trying to publish any of the assets:

```
composer require emojione/assets
```

If you want to serve the assets yourself you can publish them with the following commands. Remember to update `config/emojione.php`

PNG files in sizes 32/64/128:

```
$ php artisan vendor:publish --tag=public --provider="ChristofferOK\LaravelEmojiOne\LaravelEmojiOneServiceProvider"
```

In `config/emojione.php` specify the local path. Remember to specify which size you want in the path (32/64/128).

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

### Sprites

[](#sprites)

If you want to use sprites:

```
$ php artisan vendor:publish --tag=sprites --provider="ChristofferOK\LaravelEmojiOne\LaravelEmojiOneServiceProvider"
```

In `config/emojione.php` enable sprites:

```
'sprites' => true,
'spriteSize' => 32, // 32 or 64
```

Add the stylesheet to your HTML:

```

```

License
-------

[](#license)

Remember to read the [EmojiOne Free License](https://www.emojione.com/developers/free-license) and provide the appropriate attribution. Or buy a [premium license](https://www.emojione.com/developers/premium-license)

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~132 days

Recently: every ~260 days

Total

16

Last Release

1389d ago

Major Versions

1.0.1 → 2.0.02017-04-27

2.1.3 → 3.0.02018-09-06

3.0.0 → 4.0.02018-09-06

4.0.4 → 5.0.02021-08-03

PHP version history (2 changes)1.0.0PHP ~5.6|~7.0

5.0.0PHP ~5.6|~7.0|~8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/299670?v=4)[Christoffer Korvald](/maintainers/christofferok)[@christofferok](https://github.com/christofferok)

---

Top Contributors

[![christofferok](https://avatars.githubusercontent.com/u/299670?v=4)](https://github.com/christofferok "christofferok (20 commits)")[![HDVinnie](https://avatars.githubusercontent.com/u/12850699?v=4)](https://github.com/HDVinnie "HDVinnie (2 commits)")[![Enaah](https://avatars.githubusercontent.com/u/10073766?v=4)](https://github.com/Enaah "Enaah (1 commits)")[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (1 commits)")[![pincombe](https://avatars.githubusercontent.com/u/3033010?v=4)](https://github.com/pincombe "pincombe (1 commits)")

---

Tags

emojiemojionelaravellaravel-packagephplaravelemojiemojioneChristofferOKLaravelEmojiOne

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/christofferok-laravel-emojione/health.svg)

```
[![Health](https://phpackages.com/badges/christofferok-laravel-emojione/health.svg)](https://phpackages.com/packages/christofferok-laravel-emojione)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[unicodeveloper/laravel-emoji

A Laravel 5 Package for Using &amp; Working With Emojis

21024.9k](/packages/unicodeveloper-laravel-emoji)[stidges/laravel-country-flags

A Laravel wrapper for the stidges/country-flags package

28134.6k](/packages/stidges-laravel-country-flags)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
