Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 060b986

Browse files
resolve app from local variables
1 parent 11e1f89 commit 060b986

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/WebSocketsServiceProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function configurePubSub()
6666
return (new RedisClient())->boot($this->loop);
6767
});
6868

69-
app(BroadcastManager::class)->extend('redis-pusher', function ($app, array $config) {
69+
$this->app->get(BroadcastManager::class)->extend('redis-pusher', function ($app, array $config) {
7070
$pusher = new Pusher(
7171
$config['key'], $config['secret'],
7272
$config['app_id'], $config['options'] ?? []
@@ -95,11 +95,11 @@ public function register()
9595

9696
$this->app->singleton(ChannelManager::class, function () {
9797
return config('websockets.channel_manager') !== null && class_exists(config('websockets.channel_manager'))
98-
? app(config('websockets.channel_manager')) : new ArrayChannelManager();
98+
? $this->app->get(config('websockets.channel_manager')) : new ArrayChannelManager();
9999
});
100100

101101
$this->app->singleton(AppProvider::class, function () {
102-
return app(config('websockets.app_provider'));
102+
return $this->app->get(config('websockets.app_provider'));
103103
});
104104
}
105105

@@ -124,7 +124,7 @@ protected function registerRoutes()
124124
protected function registerDashboardGate()
125125
{
126126
Gate::define('viewWebSocketsDashboard', function ($user = null) {
127-
return app()->environment('local');
127+
return $this->app->environment('local');
128128
});
129129

130130
return $this;

0 commit comments

Comments
 (0)