diff --git a/src/ChannelManagers/LocalChannelManager.php b/src/ChannelManagers/LocalChannelManager.php index 46e3615131..fd824bc169 100644 --- a/src/ChannelManagers/LocalChannelManager.php +++ b/src/ChannelManagers/LocalChannelManager.php @@ -173,7 +173,10 @@ public function unsubscribeFromAllChannels(ConnectionInterface $connection): Pro $this->getLocalChannels($connection->app->id) ->then(function ($channels) use ($connection) { - collect($channels)->each->unsubscribe($connection); + collect($channels) + ->each(function (Channel $channel) use ($connection) { + $channel->unsubscribe($connection); + }); collect($channels) ->reject->hasConnections()