working on broadcasting

This commit is contained in:
Taylor Otwell
2016-04-29 22:40:08 -05:00
parent 749528db0c
commit da662e40ec
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::route(['middleware' => ['web']]);
Broadcast::channel('channel-name.*', function ($user, $id) {
return true;
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}