@@ -63,8 +63,8 @@ protected function configureStatisticsLogger()
63
63
64
64
$ browser = new Browser ($ this ->loop , $ connector );
65
65
66
- app () ->singleton (StatisticsLoggerInterface::class, function () use ($ browser ) {
67
- return new HttpStatisticsLogger (app (ChannelManager::class), $ browser );
66
+ $ this -> laravel ->singleton (StatisticsLoggerInterface::class, function () use ($ browser ) {
67
+ return new HttpStatisticsLogger ($ this -> laravel -> make (ChannelManager::class), $ browser );
68
68
});
69
69
70
70
$ this ->loop ->addPeriodicTimer (config ('websockets.statistics.interval_in_seconds ' ), function () {
@@ -76,7 +76,7 @@ protected function configureStatisticsLogger()
76
76
77
77
protected function configureHttpLogger ()
78
78
{
79
- app () ->singleton (HttpLogger::class, function () {
79
+ $ this -> laravel ->singleton (HttpLogger::class, function () {
80
80
return (new HttpLogger ($ this ->output ))
81
81
->enable ($ this ->option ('debug ' ) ?: config ('app.debug ' ))
82
82
->verbose ($ this ->output ->isVerbose ());
@@ -87,7 +87,7 @@ protected function configureHttpLogger()
87
87
88
88
protected function configureMessageLogger ()
89
89
{
90
- app () ->singleton (WebsocketsLogger::class, function () {
90
+ $ this -> laravel ->singleton (WebsocketsLogger::class, function () {
91
91
return (new WebsocketsLogger ($ this ->output ))
92
92
->enable ($ this ->option ('debug ' ) ?: config ('app.debug ' ))
93
93
->verbose ($ this ->output ->isVerbose ());
@@ -98,7 +98,7 @@ protected function configureMessageLogger()
98
98
99
99
protected function configureConnectionLogger ()
100
100
{
101
- app () ->bind (ConnectionLogger::class, function () {
101
+ $ this -> laravel ->bind (ConnectionLogger::class, function () {
102
102
return (new ConnectionLogger ($ this ->output ))
103
103
->enable (config ('app.debug ' ))
104
104
->verbose ($ this ->output ->isVerbose ());
@@ -145,7 +145,7 @@ protected function configurePubSubReplication()
145
145
}
146
146
147
147
if (config ('websockets.replication.driver ' ) === 'redis ' ) {
148
- app () ->singleton (ReplicationInterface::class, function () {
148
+ $ this -> laravel ->singleton (ReplicationInterface::class, function () {
149
149
return (new RedisClient ())->boot ($ this ->loop );
150
150
});
151
151
}
0 commit comments