2023-01-10 13:42:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Events;
|
|
|
|
|
|
|
|
use Illuminate\Broadcasting\Channel;
|
|
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
|
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
class Tasks
|
|
|
|
{
|
|
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the channels the event should broadcast on.
|
|
|
|
*/
|
|
|
|
public function broadcastOn(): Channel|PrivateChannel
|
|
|
|
{
|
|
|
|
return new PrivateChannel('channel-name');
|
|
|
|
}
|
2023-02-11 18:01:37 +00:00
|
|
|
|
|
|
|
public function broadcastQueue(): string
|
|
|
|
{
|
|
|
|
return 'notifications';
|
|
|
|
}
|
2023-01-10 13:42:27 +00:00
|
|
|
}
|