2017 © Pedro Peláez
 

library realtime-push

Api package to push notifications using realtime pusher node.js application with socket.io

image

tamizh/realtime-push

Api package to push notifications using realtime pusher node.js application with socket.io

  • Sunday, October 16, 2016
  • by rtamizh
  • Repository
  • 1 Watchers
  • 2 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 17 % Grown

The README.md

realtime-push

Real-time push notification package for laravel, (*1)

Please checkout the following library before using it - instant-notify, (*2)

Installation

composer require tamizh/realtime-push

or add the following line in composer.json line, (*3)

"tamizh/realtime-push" : "dev-master" and run composer update, (*4)

Add the service provider to your config/app.php file:, (*5)

        'providers'     => array(
                //...
                Realtime\Push\RealtimePusherProvider::class,

        ), 

Add the facade to your config/app.php file:, (*6)

        'facades'       => array(

                //...
                'Push'          => Realtime\Push\Facades\RealtimePusher::class,

        ), 

Publish config file using php artisan vendor:publish Modifiy the config/realtime-pusher.php. That's all set for working with functions, (*7)

And a js file will be added in public/js/notification.js. include it in your layout or pages that you are need the push notification, (*8)

var notification = new Notification(<user secret>, <url>);
notification.login();
notification.socket.on('notification',function(data){
        // do the stuff you want with data
})

As of now the text and image variables available in the server, soon it will be increased. Use text as json and parsse it in browser side javascript to have many variables., (*9)

Functions

1.createApp - to create app in notification server, (*10)

Push::createApp('test')

it will return a secert_id with success response. store or add it to the config file for creating users for this app, (*11)

2.createUser - to create User in notification server, (*12)

Push::createUser('name', 'password')

it will return the user secret with success message. store it in your database for sending notification to this user, (*13)

3.notify - to create and send it to the respective user, (*14)

Push::notify($user_secret, $text, $image)

Example

You can find my laravel demo application here , (*15)

The Versions

16/10 2016

dev-master

9999999-dev

Api package to push notifications using realtime pusher node.js application with socket.io

  Sources   Download

MIT

by tamizh

laravel realtime notification

16/10 2016

1.0.0

1.0.0.0

Api package to push notifications using realtime pusher node.js application with socket.io

  Sources   Download

MIT

by tamizh

laravel realtime notification