$ show laravel-notification-channels/onesignal
This is a Laravel notification channel package for sending push notifications via OneSignal. It integrates with Laravel's notification system to allow applications to send OneSignal notifications using Laravel's familiar notification syntax. The package provides a service provider, channel implementation, message builder with trait-based feature composition, and a payload factory for translating Laravel notification targeting to OneSignal parameters. It supports all major OneSignal features including targeting by player ID, email, tags, segments, external user IDs, buttons, web buttons, attachments, and silent notifications.
The LLM identified 1 files worth highlighting for reuse:
This component transforms Laravel notification targeting data into OneSignal API parameters. It handles multiple targeting strategies (player IDs, email, tags, segments, external user IDs) with clean separation of concerns. The factory is isolated, has minimal dependencies, and demonstrates skilled handling of complex data structure mapping. It could be extracted to any PHP project needing to interface with OneSignal's targeting system with minimal modification.