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;