Created
April 15, 2016 04:37
-
-
Save cmosguy/797ec82c7e919f575e3998b2f688ec82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace SquareKings\Broadcasting; | |
use GuzzleHttp\Client; | |
use Illuminate\Broadcasting\BroadcastManager; | |
use Illuminate\Support\Facades\Log; | |
use Illuminate\Support\ServiceProvider; | |
use SquareKings\Broadcasting\Broadcasters\PushStreamBroadcaster; | |
class PushStreamBroadcastManagerProvider extends ServiceProvider | |
{ | |
public function boot() | |
{ | |
$this->app->make('Illuminate\Broadcasting\BroadcastManager')->extend('pushstream', function ($app, $config) { | |
Log::info($config); | |
return new PushStreamBroadcaster(new Client([ | |
'base_url' => $config['base_url'], | |
'query' => [ | |
'access_key' => $config['access_key'] | |
] | |
])); | |
}); | |
} | |
/** | |
* Register the service provider. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
// TODO: Implement register() method. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment