From 8801974794e71f0d5578e12d99bcdb310add1291 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Mon, 6 Nov 2023 09:49:19 +0000 Subject: [PATCH] get connections for app --- src/Http/Controllers/StatsController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(), ];