Skip to content

Commit 398f494

Browse files
committed
accept attributes for channels
1 parent 84526c9 commit 398f494

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Illuminate/Foundation/Configuration/ApplicationBuilder.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,13 @@ public function withEvents(array $discover = [])
105105
* Register the braodcasting services for the application.
106106
*
107107
* @param string $channels
108+
* @param array $attributes
108109
* @return $this
109110
*/
110-
public function withBroadcasting(string $channels)
111+
public function withBroadcasting(string $channels, array $attributes = [])
111112
{
112-
$this->app->booted(function () use ($channels) {
113-
Broadcast::routes();
113+
$this->app->booted(function () use ($channels, $attributes) {
114+
Broadcast::routes(! empty($attributes) ? $attributes : null);
114115

115116
if (file_exists($channels)) {
116117
require $channels;

0 commit comments

Comments
 (0)