author | Chloe Laisne <chloe.laisne@gmail.com> |
Tue, 18 Oct 2016 14:42:01 +0530 | |
changeset 352 | d8a8c57f36c4 |
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; }); } }