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

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

andreseko/onesignal
===================

OneSignal Push Wrapper Laravel

v2.0.0(2y ago)0838MITPHPPHP &gt;=7.4

Since Nov 30Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (18)Used By (0)

Onesignal for Laravel
=====================

[](#onesignal-for-laravel)

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

[](#introduction)

This is a simple OneSignal wrapper library for Laravel. It simplifies the basic notification flow with the defined methods. You can send a message to all users or you can notify a single user. Before you start installing this service, please complete your OneSignal setup at  and finish all the steps that is necessary to obtain an application id and REST API Keys.

[![Latest Stable Version](https://camo.githubusercontent.com/f8785936699ba66f00926d3e16e50b1d3600714d8ebd0021f4026123a98a2a2f/68747470733a2f2f706f7365722e707567782e6f72672f616e64726573656b6f2f6f6e657369676e616c2f762f737461626c65)](https://packagist.org/packages/andreseko/onesignal)[![Total Downloads](https://camo.githubusercontent.com/5ec75dd74856ce630a11a314448db750dfee4c4e273d8414be77a5eba5776a6c/68747470733a2f2f706f7365722e707567782e6f72672f616e64726573656b6f2f6f6e657369676e616c2f646f776e6c6f616473)](https://packagist.org/packages/andreseko/onesignal)[![License](https://camo.githubusercontent.com/50748f13a1f860ed1592cc2552cfb901434a3629ac8292e06c3475c627f7cb51/68747470733a2f2f706f7365722e707567782e6f72672f616e64726573656b6f2f6f6e657369676e616c2f6c6963656e7365)](https://packagist.org/packages/andreseko/onesignal)[![Build Status](https://camo.githubusercontent.com/014cceb19a29f9ec651c4b3f36ca68afcc5ff3a11ac35b4f2c2afa4a5ec38796/68747470733a2f2f7472617669732d63692e6f72672f616e64726573656b6f2f6f6e657369676e616c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/andreseko/onesignal)

Requirements
------------

[](#requirements)

- [Composer](https://getcomposer.org)

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

[](#installation)

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

```
composer require andreseko/onesignal
```

**You only need to do the following if your Laravel version is below 5.5**:

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

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

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

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

Finally, from the command line again, run

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

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

[](#configuration)

You need to fill in `onesignal.php` file that is found in your applications `config` directory. `app_id` is your *OneSignal App ID* and `rest_api_key` is your *REST API Key*. Also you can override the parameters with your `.env` file.

Usage
-----

[](#usage)

### Send a notification for all platforms

[](#send-a-notification-for-all-platforms)

You can easily send a message to all registered users with the command:

```
$onesignal = new \AndreSeko\OneSignal\OneSignal('APP_ID', 'REST_API_KEY');
$onesignal->setTitle('MY APP')
    ->setSubTitle('My best app ever')
    ->setMessage('My cool message')
    ->sendNotification();
```

### Send a notification for iOS only

[](#send-a-notification-for-ios-only)

Sending a message to iOS users:

```
$onesignal = new \AndreSeko\OneSignal\OneSignal('APP_ID', 'REST_API_KEY');
$onesignal->setTitle('MY APP')
    ->setSubTitle('My best app ever')
    ->setMessage('My cool message')
    ->setPlataform(OneSignal::IOS)
    ->setPlataform(OneSignal::ANDROID, false)
    ->setPlataform(OneSignal::WEB, false)
    ->configureIos('my_custom_sound.caf')
    ->sendNotification();
```

### Send a notification for Android only

[](#send-a-notification-for-android-only)

Sending a message to Android users:

```
$onesignal = new \AndreSeko\OneSignal\OneSignal('APP_ID', 'REST_API_KEY');
$onesignal->setTitle('MY APP')
    ->setSubTitle('My best app ever')
    ->setMessage('My cool message')
    ->setPlataform(OneSignal::ANDROID)
    ->setPlataform(OneSignal::IOS, false)
    ->setPlataform(OneSignal::WEB, false)
    ->configureAndroid('my_custom_sound')
    ->sendNotification();
```

### Get all notifications

[](#get-all-notifications)

Getting all notifications from Onesignal

```
$onesignal = new \AndreSeko\OneSignal\OneSignal('APP_ID', 'REST_API_KEY');
$response = $onesignal->getNotifications();
```

Please refer to  for all customizable parameters.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~101 days

Recently: every ~225 days

Total

16

Last Release

837d ago

Major Versions

v1.6.0 → v2.0.02024-01-31

PHP version history (3 changes)v1.0.0PHP &gt;=5.4.0

v1.0.2PHP &gt;=7.0

v1.5.0PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![andreseko](https://avatars.githubusercontent.com/u/1248196?v=4)](https://github.com/andreseko "andreseko (39 commits)")

---

Tags

laravelpushWebPushlaravel 5onesignal

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)
