websockets

This commit is contained in:
David Bomba 2023-03-17 22:33:14 +11:00
parent 8320021e08
commit c708a1c093
2 changed files with 12 additions and 2 deletions

View File

@ -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<string, mixed>
*/
public function broadcastWith(): array
{
return ['id' => 'value'];
}
}

View File

@ -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,