Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Litemoji Laravel Package

elvanto/litemoji

LitEmoji is a lightweight PHP library for converting emoji between Unicode, HTML entities, and :shortcode: formats. Includes emoji stripping plus configurable shortcode exclusions and aliases. Works with UTF-8 and can accept encoding hints.

View on GitHub
Deep Wiki
Context7

A PHP library simplifying the conversion of unicode, HTML and shortcode emoji 🔥

Frequently asked questions about Litemoji
How do I install LitEmoji in a Laravel project?
Run `composer require elvanto/litemoji` in your project root. The package integrates seamlessly with Laravel’s autoloader and provides a `LitEmoji` facade for easy usage. No additional configuration is required for basic functionality.
Which Laravel versions does LitEmoji support?
LitEmoji officially supports Laravel 10+ (PHP 8.1+) and Laravel 11+ (PHP 8.2+). For PHP 8.3/8.4, ensure you’re using version 5.2.0 or later. Older Laravel versions may require manual facade adjustments or dependency tweaks.
Can I exclude certain emoji shortcodes from conversion?
Yes, use `LitEmoji::config('excludeShortcodes', ['shortcode1', 'shortcode2'])` to skip specific shortcodes during Unicode or HTML-to-shortcode conversion. This is useful for filtering out platform-specific or irrelevant emoji.
How does LitEmoji handle deprecated emoji (e.g., 👨‍👩‍👧‍👦 → 👨👩👧👦)?
Emojibase 16 updates may replace deprecated emoji. Use `Emoji::getAll()` to audit mappings post-upgrade, then log warnings for deprecated emoji via `Log::warning()`. For legacy data, manually migrate or replace deprecated shortcodes in your database.
Does LitEmoji work with Laravel’s Eloquent or database storage?
Yes, LitEmoji integrates with Eloquent and can process emoji in database fields. For new Emojibase 16 emoji, ensure your schema supports UTF-8MB4 (e.g., `utf8mb4_unicode_ci` collation). Use migrations to update legacy emoji data if needed.
How do I add custom emoji aliases (e.g., `:yeah: = :thumbsup:`)?
Use `LitEmoji::config('aliasShortcodes', ['yeah' => 'thumbsup'])` to define custom aliases. These will apply during Unicode-to-shortcode conversion. Test thoroughly to avoid conflicts with existing shortcodes.
Will LitEmoji break if I upgrade to PHP 8.3/8.4 with Laravel 11?
No breaking changes are expected for PHP 8.3/8.4, but test with `composer require elvanto/litemoji:^5.2.0` to confirm compatibility. Laravel 11’s type system or attributes won’t conflict with LitEmoji’s core functionality.
Can I use LitEmoji with Laravel Scout for search indexing?
Yes, but reindex existing content after upgrading to Emojibase 16, as new emoji (e.g., 🧑‍🔬) may require updated search terms. Use `Emoji::toUnicode()` or `Emoji::toHtml()` in custom analyzers for consistent indexing.
How do I remove all emoji from a string in Laravel Blade?
Use `{{ Emoji::removeEmoji($text) }}` in Blade templates to strip emoji. This works for both Unicode (😀) and HTML entities (😀). For bulk processing, apply it in controllers or service providers.
Are there alternatives to LitEmoji for Laravel emoji handling?
Alternatives include `symfony/string` (for basic emoji detection) or `league/html-to-markdown` (for Markdown emoji support). However, LitEmoji is optimized for Laravel with Emojibase 16 integration, shortcode exclusions, and UTF-8 handling out of the box.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor