server/src/app/Providers/BroadcastServiceProvider.php
author ymh <ymh.work@gmail.com>
Wed, 22 Feb 2017 07:57:05 +0100
changeset 519 ef3e4841d506
parent 280 59a2c10ac9b8
permissions -rw-r--r--
Correct bug #0026428 - in notice filter on creation date for period

<?php

namespace CorpusParole\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;

class BroadcastServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Broadcast::routes();

        /*
         * Authenticate the user's personal channel...
         */
        Broadcast::channel('App.User.*', function ($user, $userId) {
            return (int) $user->id === (int) $userId;
        });
    }
}