2017-25 © Pedro Peláez
 

library fanout

A simple Laravel 5 fanout.io service provider

image

barisbora/fanout

A simple Laravel 5 fanout.io service provider

  • Monday, November 30, 2015
  • by barisbora
  • Repository
  • 2 Watchers
  • 6 Stars
  • 47 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel 5 Fanout.io Web Socket Service

Latest Stable Version License, (*1)

A simple Laravel 5 service provider for Fanout., (*2)

Installation

The Laravel 5 Fanout Service Provider can be installed via Composer by requiring the barisbora/fanout package in your project's composer.json., (*3)

composer require barisbora/fanout

Configuration

To use the Fanout Service Provider, you must register the provider when bootstrapping your Laravel application., (*4)

Find the providers key in your config/app.php and register the Service Provider., (*5)

    'providers' => [
        // ...
        barisbora\Fanout\FanoutServiceProvider::class,
    ],

Find the aliases key in your config/app.php and register the Facade., (*6)

    'aliases' => [
        // ...
        'Fanout'    => barisbora\Fanout\Facades\FanoutFacade::class,
    ],

Usage

Run php artisan vendor:publish to publish the default config file, edit caching setting withing the resulting config/fanout.php file as desired., (*7)

$fanout = Fanout::start();
$fanout->trigger( 'want-to-brodcast-channel-name', [
    'data1' => 'lorem ipsum dolor',
    // ...
] );

DONT FORGET change YOUR-REALM-ID and YOUR-CHANNEL, (*8)

View:, (*9)

@extends('layouts.default')

@section('content')

    Fanout.io Web Socket

@endsection

@section('footer')
    
    <script type="text/javascript">
        var client = new Faye.Client('http://YOUR-REALM-ID.fanoutcdn.com/bayeux');
        client.subscribe('/YOUR-CHANNEL', function (data) {
            console.log( data );
        });
    </script>
@endsection

The Versions

30/11 2015

dev-master

9999999-dev

A simple Laravel 5 fanout.io service provider

  Sources   Download

MIT

The Requires

 

17/08 2015

1.0.5

1.0.5.0

A simple Laravel 5 fanout.io service provider

  Sources   Download

MIT

The Requires

 

17/08 2015

1.0.1

1.0.1.0

A simple Laravel 5 fanout.io service provider

  Sources   Download

MIT

The Requires

 

17/08 2015

1.0.2

1.0.2.0

A simple Laravel 5 fanout.io service provider

  Sources   Download

MIT

The Requires