diff --git a/src/Http/Controllers/StatsController.php b/src/Http/Controllers/StatsController.php index b8845955..8bf1ad4c 100644 --- a/src/Http/Controllers/StatsController.php +++ b/src/Http/Controllers/StatsController.php @@ -20,10 +20,11 @@ public function onOpen(ConnectionInterface $conn, RequestInterface $request = nu tap($conn)->send(new JsonResponse((object) [ 'connections' => App::make(ConnectionManager::class)->for($app)->all()->count(), - 'channels' => App::make(ChannelManager::class)->for($app)->all()->map(function ($channel) { + 'channels' => App::make(ChannelManager::class)->for($app)->all()->map(function ($channel) use ($app) { return [ 'name' => $channel->name(), 'connections' => App::make(ChannelManager::class) + ->for($app) ->connectionKeys($channel) ->count(), ];