author | ymh <ymh.work@gmail.com> |
Sat, 12 Nov 2016 17:21:25 +0100 | |
changeset 414 | 5c6c526a7fc1 |
parent 280 | 59a2c10ac9b8 |
permissions | -rw-r--r-- |
<?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; }); } }