From 398f49485e305756409b52af64837c784fd30de9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 15 Mar 2024 16:42:51 -0500 Subject: [PATCH] accept attributes for channels --- .../Foundation/Configuration/ApplicationBuilder.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php b/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php index 200f1f2d3b8a..343786c10b18 100644 --- a/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php +++ b/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php @@ -105,12 +105,13 @@ public function withEvents(array $discover = []) * Register the braodcasting services for the application. * * @param string $channels + * @param array $attributes * @return $this */ - public function withBroadcasting(string $channels) + public function withBroadcasting(string $channels, array $attributes = []) { - $this->app->booted(function () use ($channels) { - Broadcast::routes(); + $this->app->booted(function () use ($channels, $attributes) { + Broadcast::routes(! empty($attributes) ? $attributes : null); if (file_exists($channels)) { require $channels;