2017 © Pedro Peláez
 

library web-push

Allows web push notifications to be sent to micro service

image

jsefton/web-push

Allows web push notifications to be sent to micro service

  • Thursday, October 12, 2017
  • by jsefton
  • Repository
  • 1 Watchers
  • 0 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Web Push

This package allows you to connect into a micro service for handling web push notifications., (*1)

Installation

composer require jsefton/web-push

Usage

Push::init("API_KEY")
    ->setMode('dev')
    ->send([
        'site' => 'default',
        'payload' => [
            'title' => $data['title'],
            'body' => $data['message']
        ]
    ]);

Methods

init First method that should be called passing in a valid API key., (*2)

setMode Allows to switch between different API modes and domains that are preset., (*3)

setDomain Allows to override the API domain that requests are sent too., (*4)

send Array of data that is passed onto the API. Requires payload as an array of supportted web push data. site optional to bind for a specific site., (*5)

The Versions

12/10 2017

dev-master

9999999-dev https://github.com/jsefton/web-push

Allows web push notifications to be sent to micro service

  Sources   Download

MIT

by Jamie Sefton

php