2017 © Pedro Peláez
 

library centrifuge-broadcaster

Centrifuge and centrifugo broadcaster for laravel 5.1

image

smart-crowd/centrifuge-broadcaster

Centrifuge and centrifugo broadcaster for laravel 5.1

  • Monday, March 28, 2016
  • by klermonte
  • Repository
  • 3 Watchers
  • 6 Stars
  • 443 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

centrifuge-broadcaster

Centrifuge and centrifugo broadcaster for laravel 5.1, (*1)

Centrifuge is not supported at this time because changes made during the upgrade Centrifugo to 1.0 broken backward compatibility., (*2)

If you can not go to Centrifugo, use the package version 0.3.1, (*3)

Installation

  1. composer require smart-crowd/centrifuge-broadcaster
  2. In config/broadcasting:
    'default' => 'centrifuge',
    'connections' => [
        ...
        'centrifuge' => [
            'driver'          => 'centrifuge',
            'transport'       => 'http', // or redis
            'redisConnection' => 'default', // for redis transport only
            'baseUrl'         => 'http://myapp.exapmle:8000',
            'secret'          => 'f27d79a1-821f-4e3f-47b2-7cb308768c77',
            'topLevelFields'  => [
                /**
                 * to implement
                 * http://fzambia.gitbooks.io/centrifugal/content/mixed/exclude_sender.html
                 * you should pass in payload `centClientId` field
                 */
                'centClientId' => 'client',
            ],
        ]
    ]
  1. Add provider and alias in config/app.php
    'providers' => [
        ...
        SmartCrowd\Centrifuge\CentrifugeServiceProvider::class
    ],

    'aliases' => [
        ...
        'Centrifuge' => SmartCrowd\Centrifuge\CentrifugeFacade::class
    ]

Server configuration

http://fzambia.gitbooks.io/centrifugal/content/index.html, (*4)

Send messages to centrifugo

You should just fire broadcastable event. See http://laravel.com/docs/5.1/events#broadcasting-events. Don't forget, that events are broadcasted into queued jobs, so configure your queues., (*5)

Connect from client

Use oficial centrifuge client library https://github.com/centrifugal/centrifuge-js. In your view:, (*6)









The Versions

28/03 2016

dev-dev

dev-dev

Centrifuge and centrifugo broadcaster for laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul Klementev

laravel centrifuge centrifugo broadcaster

31/10 2015

dev-master

9999999-dev

Centrifuge and centrifugo broadcaster for laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul Klementev

laravel centrifuge centrifugo broadcaster

31/10 2015

v1.0

1.0.0.0

Centrifuge and centrifugo broadcaster for laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul Klementev

laravel centrifuge centrifugo broadcaster

28/08 2015

V0.3.1

0.3.1.0

Centrifuge and centrifugo broadcaster for laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul Klementev

laravel centrifuge centrifugo broadcaster

28/08 2015

v0.3

0.3.0.0

Centrifuge and centrifugo broadcaster for laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul Klementev

laravel centrifuge centrifugo broadcaster

24/08 2015

v0.2

0.2.0.0

Centrifuge and centrifugo broadcaster for laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul Klementev

laravel centrifuge centrifugo broadcaster

13/08 2015

v0.1

0.1.0.0

Centrifuge and centrifugo broadcaster for laravel 5.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Paul Klementev

laravel centrifuge centrifugo broadcaster