Download the PHP package lepresk/laravel-onesignal without Composer

On this page you can find all versions of the php package lepresk/laravel-onesignal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-onesignal

Laravel OneSignal

Latest Version on Packagist Total Downloads License

OneSignal notification channel for Laravel applications. Send push notifications to iOS, Android, and web browsers through OneSignal's API with a clean, fluent interface.

Features

Requirements

Installation

Install the package via Composer:

The service provider will be automatically registered through Laravel's package auto-discovery.

Publish Configuration

Publish the configuration file to customize package behavior:

Environment Configuration

Add your OneSignal credentials to your .env file:

Usage

Basic Usage with Facade

Using Laravel Notifications

Create a notification class:

Send the notification:

Building Messages

Multi-language Support

Priority Settings

Targeting Users

External User IDs

External User IDs are custom identifiers you assign to your users in OneSignal. They map your application's user IDs to OneSignal player IDs, allowing you to send notifications to specific users without tracking OneSignal's internal player IDs.

Segments

Segments are groups of users defined in your OneSignal dashboard based on various criteria.

Tags

Tags are key-value pairs you set on user devices to create custom targeting rules.

Custom Data

Images and Buttons

The third parameter in addButton() is optional and specifies the URL to open when the button is clicked.

Advanced Options

Event Listeners

Listen to notification lifecycle events:

Example listener implementation:

Configuration

The package provides extensive configuration options in config/onesignal.php:

Default Values

The package applies default values from the configuration file. These defaults are used only when values are not explicitly set on the message.

Testing

Run the test suite:

Run tests with coverage:

Code Quality

Format code with Laravel Pint:

Run static analysis with PHPStan:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-onesignal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
illuminate/contracts Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
illuminate/notifications Version ^11.0|^12.0
norkunas/onesignal-php-api Version ^2.15
nyholm/psr7 Version ^1.8
symfony/http-client Version ^7.1
psr/log Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lepresk/laravel-onesignal contains the following files

Loading the files please wait ...