| Package Data | |
|---|---|
| Maintainer Username: | andromisa |
| Package Create Date: | 2015-03-09 |
| Package Last Update: | 2016-05-28 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-25 03:01:57 |
| Package Statistics | |
|---|---|
| Total Downloads: | 212 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 4 |
| Total Watchers: | 3 |
| Total Forks: | 2 |
| Total Open Issues: | 2 |
Laravel 5 and ratchet integration
Require composer
"admsa/larachet": "dev-master"
Add provider to your config/app.php
'providers' => [
// Existing providers
'Admsa\Larachet\LarachetServiceProvider',
]
Add facade alias to your config/app.php
'aliases' => [
// Existing aliases
'Larachet' => 'Admsa\Larachet\LarachetFacade'
]
$data = [];
Larachet::push('kittens-category', $data);
Javascript code usage
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));
});
This is still under development.
Javascript code is already loaded. Kindly check the html source code.
http://blog.alexandervn.nl/2012/05/03/install-zeromq-php-ubuntu