PHPackages                             dieter91/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. [HTTP &amp; Networking](/categories/http)
4. /
5. dieter91/onesignal-laravel

ActiveLibrary[HTTP &amp; Networking](/categories/http)

dieter91/onesignal-laravel
==========================

OneSignal Push Wrapper Laravel

03PHP

Since Feb 17Pushed 3y agoCompare

[ Source](https://github.com/Dieter91/laravel-onesignal)[ Packagist](https://packagist.org/packages/dieter91/onesignal-laravel)[ RSS](/packages/dieter91-onesignal-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)DependenciesVersions (1)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

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 58.7% 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.

### Community

Maintainers

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

---

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)")[![Chathula](https://avatars.githubusercontent.com/u/4932296?v=4)](https://github.com/Chathula "Chathula (2 commits)")[![ksvendsen](https://avatars.githubusercontent.com/u/302771?v=4)](https://github.com/ksvendsen "ksvendsen (2 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)")[![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)")[![jonlod](https://avatars.githubusercontent.com/u/11176886?v=4)](https://github.com/jonlod "jonlod (1 commits)")[![kossa](https://avatars.githubusercontent.com/u/1175584?v=4)](https://github.com/kossa "kossa (1 commits)")

### Embed Badge

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

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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