PHPackages                             awaluddinkasim/onesignal-pushnotification - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. awaluddinkasim/onesignal-pushnotification

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

awaluddinkasim/onesignal-pushnotification
=========================================

A simple Laravel package for seamless integration with OneSignal push notification service

v1.0.4(1y ago)38MITPHPPHP ^8.2

Since Nov 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/awaluddinkasim/onesignal-pushnotification)[ Packagist](https://packagist.org/packages/awaluddinkasim/onesignal-pushnotification)[ Fund](https://trakteer.id/awaluddinkasim/tip)[ RSS](/packages/awaluddinkasim-onesignal-pushnotification/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

OneSignal Push Notification
===========================

[](#onesignal-push-notification)

A Laravel package for seamless integration with OneSignal push notification service.

[![Latest Stable Version](https://camo.githubusercontent.com/8d389ef20126c94723e541d4014ad12b66a2d578d6554bbfc3988f430d60a09c/68747470733a2f2f706f7365722e707567782e6f72672f6177616c756464696e6b6173696d2f6f6e657369676e616c2d707573686e6f74696669636174696f6e2f76)](https://packagist.org/packages/awaluddinkasim/onesignal-pushnotification) [![License](https://camo.githubusercontent.com/4308ec0ad95c6bfcca3e255ea51cdef48d6b029ec0d383479456d5f4f35ad954/68747470733a2f2f706f7365722e707567782e6f72672f6177616c756464696e6b6173696d2f6f6e657369676e616c2d707573686e6f74696669636174696f6e2f6c6963656e7365)](https://github.com/awaluddinkasim/onesignal-pushnotification/blob/main/LICENSE.md) [![PHP Version Require](https://camo.githubusercontent.com/8376b377455e3cffd4095863f0bea6fa9965db0991cfcbfa703b0ae3baa3d0a0/68747470733a2f2f706f7365722e707567782e6f72672f6177616c756464696e6b6173696d2f6f6e657369676e616c2d707573686e6f74696669636174696f6e2f726571756972652f706870)](https://packagist.org/packages/awaluddinkasim/onesignal-pushnotification)

Introduction
------------

[](#introduction)

OneSignal is a platform that offers multiple messaging channels including mobile push notifications, web push, SMS, email, and in-app messaging. This Laravel package specifically focuses on implementing push notifications functionality from OneSignal's services into your Laravel application. Check out the [documentation](https://documentation.onesignal.com/docs) for more information about OneSignal.

Installation
------------

[](#installation)

To install this package, simply run the following command:

```
composer require awaluddinkasim/onesignal-pushnotification

```

Next, run the this command to publish the configuration file:

```
php artisan vendor:publish --provider="AwaluddinKasim\OneSignalPushNotification\OneSignalServiceProvider"

```

Usage
-----

[](#usage)

Add your OneSignal App ID and API Key to your `.env` file:

```
ONESIGNAL_APP_ID=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ONESIGNAL_API_KEY=xx_xx_xxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

```

Check [here](https://documentation.onesignal.com/docs/keys-and-ids#app-id) for more information about App ID and API Key.

#### Note

[](#note)

Starting November 14 2024, OneSignal has implemented a new Rich API key system and is deprecating legacy API keys. This package is updated to use the new Rich API key system.

### Send a push notification to all subscribers:

[](#send-a-push-notification-to-all-subscribers)

```
use AwaluddinKasim\OneSignalPushNotification\OneSignal;

OneSignal::sendToAll($your_message);

```

### Send a push notification to specific segments:

[](#send-a-push-notification-to-specific-segments)

```
use AwaluddinKasim\OneSignalPushNotification\OneSignal;

OneSignal::sendToSegments($your_segments, $your_message);

```

### Send a push notification to a user by external user ID:

[](#send-a-push-notification-to-a-user-by-external-user-id)

```
use AwaluddinKasim\OneSignalPushNotification\OneSignal;

OneSignal::sendToUsers($external_user_id, $your_message);

```

`$external_user_id` can be a string or an array of strings. If an array is given, all the given IDs will receive the notification.

You can read more about External ID [here](https://documentation.onesignal.com/docs/users#external-id).

License
-------

[](#license)

This package is released under the [MIT License](https://github.com/awaluddinkasim/onesignal-pushnotification/blob/main/LICENSE.md).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance43

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Total

5

Last Release

449d ago

PHP version history (3 changes)v1.0.0PHP ^8.0

v1.0.1PHP &gt;=8.0

v1.0.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8f156500d7137e5dbdf46b45679e0dcdd5644e6eff72d6aabbe89a975c398d9?d=identicon)[awaluddinkasim](/maintainers/awaluddinkasim)

---

Top Contributors

[![awaluddinkasim](https://avatars.githubusercontent.com/u/82737899?v=4)](https://github.com/awaluddinkasim "awaluddinkasim (20 commits)")

---

Tags

laravel-notificationslaravel-packagelaravel-push-notificationsonesignalonesignal-notificationsonesignal-push-notificationpush-notificationslaravelpushnotificationpush notificationonesignallaravel-notificationone-signalonesignal-notificationonesignal-push-notificationonesignal-push-notification-laravel

### Embed Badge

![Health badge](/badges/awaluddinkasim-onesignal-pushnotification/health.svg)

```
[![Health](https://phpackages.com/badges/awaluddinkasim-onesignal-pushnotification/health.svg)](https://phpackages.com/packages/awaluddinkasim-onesignal-pushnotification)
```

###  Alternatives

[berkayk/onesignal-laravel

OneSignal Push Wrapper Laravel

5295.9M12](/packages/berkayk-onesignal-laravel)[ladumor/one-signal

Laravel Wrapper for OneSignal.

125331.3k](/packages/ladumor-one-signal)[naif/nova-push-notification

A Laravel Nova tool to send push notifications via OneSignal

166.4k](/packages/naif-nova-push-notification)[dropfan/onesignal-server-api

OneSignal server API for PHP, you can push notifications to any platform. (iOS/APNS, Android/GCM/FCM, WP, Web/Chrome/Safari...etc.) No third-party dependency that you can use this library in any project or framework.

169.2k](/packages/dropfan-onesignal-server-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
