nourallah / onesignalnotifier
generate and verifiy OneSignalNotifier with limit
v1.0.1
2025-07-20 07:19 UTC
Requires
- php: ^8.0
- illuminate/support: ^12.0
README
A simple Laravel package to send OneSignal notifications.
Installation
composer require nourallah/onesignalnotifier ## Configuration Add your OneSignal credentials to your .env file: ONESIGNAL_APP_ID=your-app-id ONESIGNAL_REST_API_KEY=your-rest-api-key ## Usage use Nourallah\OneSignalNotifier\OneSignalNotifier; $notifier = new OneSignalNotifier(); $notifier->sendToAll('Hello everyone!'); Send notification with Arabic and English $notifier->sendToAll([ 'en' => 'Hello everyone', 'ar' => 'مرحبا بالجميع', ]); # Send notification to a specific user $notifier->sendToUser('player-id-123', 'You have a new message');