milesj/emojibase
milesj/emojibase delivers comprehensive, up-to-date emoji data for PHP applications. It includes Unicode characters, shortcodes, annotations, skin tones, and localization, making it easy to search, filter, and render emoji consistently across Laravel and other PHP projects.
booted event) or via OPcache.:skin-tone-* for a specific feature).twemoji) to compare against?Validator (custom rule) or Form Requests.@emoji helpers for rendering./api/emojis endpoint) for consistent validation.emoji-picker-react for UI consistency.emoji_valid column to text fields (e.g., posts) if validation is critical.casts to serialize/deserialize emoji-rich content.milesj/emojibase).use MilesJ\Emojibase\Facades\Emojibase;
class EmojiValidRule implements Rule {
public function passes($attribute, $value) {
return Emojibase::validate($value);
}
}
Emojibase::setCachePath(storage_path('framework/cache/emojibase.json'));
Blade::directive('emoji', function ($expression) {
return "<?php echo MilesJ\Emojibase\Facades\Emojibase::render($expression); ?>";
});
Route::get('/api/emojis', function () {
return Emojibase::getAll();
});
fetch('/api/emojis').then(res => res.json()).then(emojis => {
// Initialize emoji picker with server-side data
});
MilesJ\Emojibase).symfony/polyfill-iconv).| Step | Priority | Effort | Dependencies |
|---|---|---|---|
| Add package | High | Low | None |
| Implement validation rules | High | Medium | Package installed |
| Cache datasets | Medium | Low | Validation working |
| Blade helpers | Medium | Low | Caching implemented |
| Frontend API | Low | Medium | Validation confirmed |
| Localization tests | Low | High | All other steps |
deprecated() method to warn users of obsolete emoji.README.md section in the repo for:
:flag: emoji) to reduce memory usage.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package update breaks validation | Invalid emoji slip through | Test new versions in staging |
| Cache miss on dataset |
How can I help you explore Laravel packages today?