PHPackages                             jonlod/onesignal-laravel - 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. jonlod/onesignal-laravel

ActiveLibrary

jonlod/onesignal-laravel
========================

OneSignal Push Wrapper Laravel

v1.5.0(2mo ago)08.4k2MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Apr 29Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/jonlod/laravel-onesignal)[ Packagist](https://packagist.org/packages/jonlod/onesignal-laravel)[ RSS](/packages/jonlod-onesignal-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (32)Used By (0)

OneSignal Push Notifications for Laravel
========================================

[](#onesignal-push-notifications-for-laravel)

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

[](#introduction)

This is a rehash from the original Berkayk package.

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

[](#installation)

First, you'll need to require the package with Composer:

```
composer require jonlod/onesignal-laravel
```

Auto discovery is on. if you use Laravel 5.4 or lower =&gt;

\----- &lt;=5.4

update `config/app.php` by adding an entry for the service provider.

```
'providers' => [
	// ...
	jonlod\OneSignal\OneSignalServiceProvider::class
];
```

Then, register class alias by adding an entry in aliases section

```
'aliases' => [
	// ...
	'OneSignal' => jonlod\OneSignal\OneSignalFacade::class
];
```

\------- &lt;=5.4

Finally, from the command line again, run

```
php artisan vendor:publish --tag=config

```

to publish the default configuration file. This will publish a configuration file named `onesignal.php`.

Configuration
-------------

[](#configuration)

Keys should be set in the .env

```
ONESIGNAL_APP_ID=
ONESIGNAL_REST_API_KEY=
```

Tomorrow hour can be changed in the onesignal.php config file. This is only used for delayed push notifications on the next day.

### App prep

[](#app-prep)

Apps should fill in the external id parameter with the user id.

### Models

[](#models)

App\\Models\\User is used as default path for the user model

### Async

[](#async)

All pushes use the job: SendPushes. This is automatically queued if a queue is available.

Usage
-----

[](#usage)

Include the trait anywhere.

### Sending a Notifications

[](#sending-a-notifications)

```
Push::pushToAll(...);
Push::pushToAllTag(...);
Push::pushToUser(...);
Push::pushToUsers(...);
Push::pushToAllTomorrow(...);
Push::pushToAllScheduled(...);
```

Helpers
-------

[](#helpers)

### Trans all

[](#trans-all)

```
Push::transAll(...);
```

In the config 'languages.options' needs to be set. This will automatically translate to all available languages with possible translations in the replacements too.

Best to use this when there is translatable content, onesignal will choose the correct language on the device.

English is always required

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance86

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 56.9% 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 ~119 days

Recently: every ~447 days

Total

31

Last Release

70d ago

Major Versions

0.9.9 → v1.0-beta2018-07-17

PHP version history (5 changes)v0.9PHP &gt;=5.4.0

v1.2.1PHP ^7.2.5

v1.3.0PHP ^7.3

v1.3.5PHP ^7.3|^8.0

1.4.0PHP ^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/8065c427549219afc6bd3c0c8b245a5092cc3664455721f060b33848d7cacb58?d=identicon)[jonlod](/maintainers/jonlod)

---

Top Contributors

[![berkayk](https://avatars.githubusercontent.com/u/603844?v=4)](https://github.com/berkayk "berkayk (37 commits)")[![Maykonn](https://avatars.githubusercontent.com/u/1479805?v=4)](https://github.com/Maykonn "Maykonn (8 commits)")[![Mohammad-Alavi](https://avatars.githubusercontent.com/u/24431504?v=4)](https://github.com/Mohammad-Alavi "Mohammad-Alavi (4 commits)")[![jonlod](https://avatars.githubusercontent.com/u/11176886?v=4)](https://github.com/jonlod "jonlod (3 commits)")[![ksvendsen](https://avatars.githubusercontent.com/u/302771?v=4)](https://github.com/ksvendsen "ksvendsen (2 commits)")[![Chathula](https://avatars.githubusercontent.com/u/4932296?v=4)](https://github.com/Chathula "Chathula (2 commits)")[![mfraihi](https://avatars.githubusercontent.com/u/2482519?v=4)](https://github.com/mfraihi "mfraihi (1 commits)")[![mohammad6006](https://avatars.githubusercontent.com/u/553379?v=4)](https://github.com/mohammad6006 "mohammad6006 (1 commits)")[![narazin](https://avatars.githubusercontent.com/u/5402603?v=4)](https://github.com/narazin "narazin (1 commits)")[![ryanedgar](https://avatars.githubusercontent.com/u/7726735?v=4)](https://github.com/ryanedgar "ryanedgar (1 commits)")[![hafael](https://avatars.githubusercontent.com/u/571130?v=4)](https://github.com/hafael "hafael (1 commits)")[![jmrieger](https://avatars.githubusercontent.com/u/9476375?v=4)](https://github.com/jmrieger "jmrieger (1 commits)")[![kossa](https://avatars.githubusercontent.com/u/1175584?v=4)](https://github.com/kossa "kossa (1 commits)")[![marcus-campos](https://avatars.githubusercontent.com/u/5151894?v=4)](https://github.com/marcus-campos "marcus-campos (1 commits)")[![masucip](https://avatars.githubusercontent.com/u/4775729?v=4)](https://github.com/masucip "masucip (1 commits)")

---

Tags

laravelpushlaravel 5onesignal

### Embed Badge

![Health badge](/badges/jonlod-onesignal-laravel/health.svg)

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

###  Alternatives

[berkayk/onesignal-laravel

OneSignal Push Wrapper Laravel

5295.9M12](/packages/berkayk-onesignal-laravel)[jmrieger/onesignal-laravel

OneSignal Push Wrapper For Illuminate

2518.3k](/packages/jmrieger-onesignal-laravel)

PHPackages © 2026

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