elvanto/litemoji
Lightweight Laravel package for working with emojis: detect and parse emoji characters, convert between emoji and shortcodes, and sanitize or replace emoji in strings. Handy for chat, comments, and user-generated content where emoji handling needs to be simple and fast.
Str helper or custom facades is feasible.Str::replace or custom Blade directives).HTML::entities()) or Markdown parsers (e.g., spatie/laravel-markdown).Validator for emoji-specific rules (e.g., emoji:required).emoji composer package) require dependency audits.Emoji class for custom queries.laravel-debugbar or Blackfire.👨🏽) or ZWJ sequences (👨👩👧) robustly. Test with mb_* PHP functions.e() or htmlspecialchars().😂🏻, 🔥🔥).@emoji('shortcode') directives or custom Blade components.Emoji model for database-backed emoji libraries.response()->json(['emoji' => Emoji::toUnicode(':smile:')])).::emoji pseudo-elements (limited browser support).spatie/laravel-markdown for emoji support in posts.where('content', 'like', '%😂%')).composer require elvanto/litemoji.Emoji::toUnicode(':rocket:')).{{ Emoji::toHtml(':fire:') }}.emoji package (namespace collisions).symfony/string or league/html-to-markdown.setlocale() adjustments for RTL languages.composer.json extras).dd(Emoji::getAll()) to inspect mappings.Log::warning("Unsupported emoji: $emoji")).Cache::remember()).dispatch(new ConvertEmojiJob($posts))).shortcode/unicode.throttle middleware for abuse prevention.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package stops updating | Emoji mappings become outdated. | Fork and maintain; monitor Unicode updates. |
| Unicode emoji rendering fails | Broken UI for users. | Fallback to shortcode or placeholder. |
| Shortcode injection | XSS via malicious shortcodes. | Sanitize input with Str::of()->replace(). |
| Database overload | Slow queries on emoji-heavy tables. | Index shortcode/unicode columns. |
| PHP version incompatibility | Integration breaks. | Use Laravel’s platform-check package. |
Emoji::toHtml(':tada:')).toUnicode(), toShortcode(), or toHtml().😂🏻).How can I help you explore Laravel packages today?