Skip to content

Commit

Permalink
get connections for app
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Nov 6, 2023
1 parent 13a5617 commit 8801974
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Controllers/StatsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
];
Expand Down

0 comments on commit 8801974

Please sign in to comment.