Download the PHP package jowxidea/onesignal without Composer
On this page you can find all versions of the php package jowxidea/onesignal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jowxidea/onesignal
More information about jowxidea/onesignal
Files in jowxidea/onesignal
Package onesignal
Short Description A lightweight and easy-to-use Laravel package for integrating OneSignal push notifications into your application.
License MIT
Informations about the package onesignal
JowXIdea OneSignal
A Laravel package for sending OneSignal push notifications with a minimal client API, service provider, facade, and helper function.
Features
- Laravel auto-discovery service provider
- Config publishing (
onesignal-config) - Container binding (
onesignal) - Facade (
OneSignal) and helper (onesignal()) - Send to all users, one user, many users, or named segments
- Custom payload support and legacy-compatible notification helpers
- Consistent HTTP response metadata for easier debugging
- Built with Orchestra Testbench for package testing
Requirements
- PHP 8.1+
- Laravel 10/11/12
Installation
Configuration
Publish the config file:
Set your environment variables:
Usage
Send to all users
Send to one user
Send to many users
Send to a segment
Sending a custom payload
Legacy compatible methods
The client keeps compatibility with legacy OneSignal helpers while using Laravel HTTP internally:
sendNotificationToAllsendNotificationToUsersendNotificationToExternalUsersendNotificationUsingTags
Using the facade
Response format
All API methods return an array. When OneSignal responds with JSON, the decoded response is returned directly and enriched with _response metadata:
status— HTTP status codeok— whether the response status is 200–299successful— whether the response was successfulredirect— whether the response was a redirectheaders— returned response headers
For non-JSON responses, the package returns:
Helper function
Use the global helper anywhere in your application:
Testing
License
MIT
All versions of onesignal with dependencies
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0