2017 © Pedro Peláez
 

library larachet

Laravel 5 and ratchet integration

image

admsa/larachet

Laravel 5 and ratchet integration

  • Tuesday, March 10, 2015
  • by andromisa
  • Repository
  • 3 Watchers
  • 2 Stars
  • 212 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Larachet

Laravel 5 and ratchet integration, (*1)

Usage

Require composer, (*2)

  "admsa/larachet": "dev-master"

Add provider to your config/app.php, (*3)

'providers' => [
    // Existing providers
    'Admsa\Larachet\LarachetServiceProvider',
  ]

Add facade alias to your config/app.php, (*4)

'aliases' => [
    // Existing aliases
    'Larachet'  => 'Admsa\Larachet\LarachetFacade'
  ]
$data = [];
Larachet::push('kittens-category', $data);

Javascript code usage, (*5)

var r = new Larachet('ws://localhost:8080');

r.watch('kittens-category', function(topic, data) {
  console.log('New article published to category "' + topic + '" : ' + JSON.stringify(data));
});

r.watch('puppy-category', function(topic, data) {
  console.log('New article published to category "' + topic + '" : ' + JSON.stringify(data));
});

Note

This is still under development., (*6)

Javascript code is already loaded. Kindly check the html source code., (*7)

References

http://blog.alexandervn.nl/2012/05/03/install-zeromq-php-ubuntu, (*8)

The Versions

10/03 2015

dev-master

9999999-dev

Laravel 5 and ratchet integration

  Sources   Download

MIT

The Requires

 

The Development Requires