nourallah/onesignalnotifier

generate and verifiy OneSignalNotifier with limit

dev-main 2025-06-12 12:10 UTC

This package is auto-updated.

Last update: 2025-06-12 12:10:51 UTC


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');