Skip to content

ViecNgay/LaraSignal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaraSignal

Latest Version on Packagist Total Downloads Build Status

#LaraSignal Working with onesignal easier!

Installation

Via Composer

$ composer require viecngay/larasignal

Register the service provider and alias in your config/app.php:

    'providers' => [

        ...
        ViecNgay\LaraSignal\LaraSignalServiceProvider::class,
    ],


    'aliases' => [
        ...
        'LaraSignal' => ViecNgay\LaraSignal\Facades\LaraSignal::class
    ],

Config APP ID and REST API KEY in you .env file

ONE_SIGNAL_APP_ID=Your Onesignal App Id
ONE_SIGNAL_REST_API_KEY=Your Onesignal Rest Api Key

Usage

Send notification to segment

LaraSignal::sendToSegments($segments = [], $title = 'Title', $subTitle = 'Default Subtitle', $payload = [], $options = [])

Send notification to Player

LaraSignal::sendToDevice($deviceIds = [], $title = 'Title', $subTitle = 'Default Subtitle', $payload = [], $options = [])

See option list here https://documentation.onesignal.com/v5.0/reference

Contributing

Please see contributing.md for details and a todolist.

Credits

License

license. Please see the license file for more information.

About

Send message to DEVICE with onesignal service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages