2017 © Pedro Peláez
 

library onesignal-laravel

OneSignal Push Wrapper Laravel

image

jonlod/onesignal-laravel

OneSignal Push Wrapper Laravel

  • Tuesday, July 17, 2018
  • by jonlod
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 77 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

OneSignal Push Notifications for Laravel

Introduction

This is a rehash from the original Berkayk package., (*1)

Installation

First, you'll need to require the package with Composer:, (*2)

composer require jonlod/onesignal-laravel

Auto discovery is on. if you use Laravel 5.4 or lower =>, (*3)

----- <=5.4, (*4)

update config/app.php by adding an entry for the service provider., (*5)

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

Then, register class alias by adding an entry in aliases section, (*6)

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

------- <=5.4, (*7)

Finally, from the command line again, run, (*8)

php artisan vendor:publish --tag=config

to publish the default configuration file. This will publish a configuration file named onesignal.php., (*9)

Configuration

Keys should be set in the .env, (*10)


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., (*11)

App prep

Apps should fill in the external id parameter with the user id., (*12)

Models

App\Models\User is used as default path for the user model, (*13)

Async

All pushes use the job: SendPushes. This is automatically queued if a queue is available., (*14)

Usage

Include the trait anywhere., (*15)

Sending a Notifications

Push::pushToAll(...);
Push::pushToAllTag(...);
Push::pushToUser(...);
Push::pushToUsers(...);
Push::pushToAllTomorrow(...);
Push::pushToAllScheduled(...);

Helpers

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., (*16)

Best to use this when there is translatable content, onesignal will choose the correct language on the device., (*17)

English is always required, (*18)

The Versions

17/07 2018

dev-master

9999999-dev

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal

17/07 2018

v1.0-beta.1

1.0.0.0-beta1

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal

17/07 2018

v1.0-beta

1.0.0.0-beta

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal

22/09 2017

0.9.9

0.9.9.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

19/09 2017

0.9.8

0.9.8.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

12/02 2017

v0.9.7

0.9.7.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

31/01 2017

v0.9.6

0.9.6.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

21/12 2016

v0.9.5

0.9.5.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

19/10 2016

v0.9.4

0.9.4.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

01/06 2016

v0.9.3

0.9.3.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

04/05 2016

v0.9.2

0.9.2.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

02/05 2016

v0.9.1

0.9.1.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush

29/04 2016

v0.9

0.9.0.0

OneSignal Push Wrapper Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel laravel 5 push onesignal webpush