PHPackages                             codprox/laravel-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. codprox/laravel-onesignal

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

codprox/laravel-onesignal
=========================

A Laravel package for OneSignal push notifications

v1.0.0(1y ago)00MITPHPPHP ^8.2

Since Feb 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/codprox/laravel-onesignal)[ Packagist](https://packagist.org/packages/codprox/laravel-onesignal)[ RSS](/packages/codprox-laravel-onesignal/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Laravel-OneSignal
=================

[](#laravel-onesignal)

Package Laravel optimisé pour interconnecter votre backend avec OneSignal, permettant l'envoi de notifications push, la gestion de segments, et l'inscription d'utilisateurs de manière simple et performante.

[![Latest Version on Packagist](https://camo.githubusercontent.com/0a4f3746d2f1f1dadcad4052313d0af81ffe0bd79945a64f3e5cc2ab94f14c3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6470726f782f6c61726176656c2d6f6e657369676e616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codprox/laravel-onesignal)[![Total Downloads](https://camo.githubusercontent.com/45f7d9867268f1773d6bd888876ff0e8d7c721f8d63a009bcc7f5aa891c42f25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6470726f782f6c61726176656c2d6f6e657369676e616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codprox/laravel-onesignal)[![License](https://camo.githubusercontent.com/9f5a5e04425940bce68d03c4af589537e6a4809b3fc5f28f7b3a420fc94e9ddf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f6470726f782f6c61726176656c2d6f6e657369676e616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codprox/laravel-onesignal)

Prérequis
---------

[](#prérequis)

- PHP &gt;= 8.2
- Laravel &gt;= 11.0
- Compte OneSignal avec un `App ID` et une `REST API Key`

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

[](#installation)

Installez le package via Composer :

```
composer require codprox/laravel-onesignal

## Configuration

```Publiez le fichier de configuration (Cela créera un fichier config/onesignal.php dans votre projet) :
php artisan vendor:publish --tag=onesignal-config

```Ajoutez les variables suivantes à votre fichier .env :
ONESIGNAL_APP_ID=your_app_id
ONESIGNAL_REST_API_KEY=your_rest_api_key
ONESIGNAL_DEFAULT_ICON=https://your-site.com/default-icon.png
ONESIGNAL_CACHE_TTL=3600
ONESIGNAL_TIMEOUT=10.0
ONESIGNAL_CONNECT_TIMEOUT=5.0

```Le fichier config/onesignal.php contient les options par défaut :
return [
    'app_id' => env('ONESIGNAL_APP_ID'),
    'rest_api_key' => env('ONESIGNAL_REST_API_KEY'),
    'default_icon' => env('ONESIGNAL_DEFAULT_ICON', 'https://example.com/icon.png'),
    'cache_ttl' => env('ONESIGNAL_CACHE_TTL', 3600), // Durée en secondes
    'timeout' => env('ONESIGNAL_TIMEOUT', 10.0), // Timeout HTTP en secondes
    'connect_timeout' => env('ONESIGNAL_CONNECT_TIMEOUT', 5.0), // Timeout de connexion
];

## Utilisation

```Le package fournit une classe MyOneSignal accessible via une façade ou par injection de dépendance.

*** Via la Façade

use Codprox\OneSignal\Facades\OneSignal;
OneSignal::sendToAll(['Subject', 'Body'], ['badge_count' => 1]);

*** Via Injection de Dépendance

use Codprox\OneSignal\MyOneSignal;
class NotificationController extends Controller
{
    protected MyOneSignal $oneSignal;

    public function __construct(MyOneSignal $oneSignal)
    {
        $this->oneSignal = $oneSignal;
    }

    public function send()
    {
        $this->oneSignal->sendToAll(['Test', 'Hello World']);
    }
}

## Méthodes Disponibles

1. sendToAll(array $message, array $extraData = [], ?string $scheduledTime = null): array

2.

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance43

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

495d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/104009186?v=4)[ArmandMOUELE](/maintainers/codprox)[@codprox](https://github.com/codprox)

---

Top Contributors

[![codprox](https://avatars.githubusercontent.com/u/104009186?v=4)](https://github.com/codprox "codprox (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

254168.5k](/packages/erag-laravel-disposable-email)[laravel-notification-channels/expo

Expo Notifications Channel for Laravel

67628.6k1](/packages/laravel-notification-channels-expo)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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