diff --git a/app/Events/Invoice/InvoiceWasCreated.php b/app/Events/Invoice/InvoiceWasCreated.php index 555dab1cb0..c78ea9aef7 100644 --- a/app/Events/Invoice/InvoiceWasCreated.php +++ b/app/Events/Invoice/InvoiceWasCreated.php @@ -56,7 +56,17 @@ class InvoiceWasCreated implements ShouldBroadcast */ public function broadcastOn() { - return new PrivateChannel('channel-name'); + return ['simple-channel']; } + + /** + * Get the data to broadcast. + * + * @return array + */ + public function broadcastWith(): array + { + return ['id' => 'value']; + } } diff --git a/config/app.php b/config/app.php index 225f88c32d..16c82b06b6 100644 --- a/config/app.php +++ b/config/app.php @@ -194,7 +194,7 @@ return [ */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, - // App\Providers\BroadcastServiceProvider::class, + App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\ComposerServiceProvider::class,