2018-11-20 10:32:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace BeyondCode\LaravelWebSockets;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
|
|
class LaravelWebSocketsServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Bootstrap the application services.
|
|
|
|
|
*/
|
|
|
|
|
public function boot()
|
|
|
|
|
{
|
2018-11-20 10:51:00 +00:00
|
|
|
$this->commands([
|
|
|
|
|
Console\StartWebSocketServer::class,
|
|
|
|
|
]);
|
2018-11-20 10:32:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register the application services.
|
|
|
|
|
*/
|
|
|
|
|
public function register()
|
|
|
|
|
{
|
|
|
|
|
$this->app->singleton('websockets.router', function() {
|
|
|
|
|
return new Router();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|