Skip to content

Commit

Permalink
accept attributes for channels
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 15, 2024
1 parent 84526c9 commit 398f494
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 398f494

Please sign in to comment.