改进 广播队列

This commit is contained in:
iVampireSP.com 2023-02-12 02:01:37 +08:00
parent 73adf0f38c
commit 84f2128512
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 10 additions and 10 deletions

View File

@ -20,4 +20,9 @@ public function broadcastOn(): Channel
{ {
return new Channel('servers'); return new Channel('servers');
} }
public function broadcastQueue(): string
{
return 'notifications';
}
} }

View File

@ -12,16 +12,6 @@ class Tasks
{ {
use Dispatchable, InteractsWithSockets, SerializesModels; use Dispatchable, InteractsWithSockets, SerializesModels;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct()
{
//
}
/** /**
* Get the channels the event should broadcast on. * Get the channels the event should broadcast on.
* *
@ -31,4 +21,9 @@ public function broadcastOn(): Channel|PrivateChannel
{ {
return new PrivateChannel('channel-name'); return new PrivateChannel('channel-name');
} }
public function broadcastQueue(): string
{
return 'notifications';
}
} }