mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-17 17:01:37 +00:00
26 lines
582 B
PHP
26 lines
582 B
PHP
<?php
|
|
|
|
namespace App\Events;
|
|
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class Broadcast implements ShouldBroadcast
|
|
{
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
public function __construct(public string $type, public array $data)
|
|
{
|
|
}
|
|
|
|
public function broadcastOn(): array
|
|
{
|
|
return [
|
|
new PrivateChannel('app'),
|
|
];
|
|
}
|
|
}
|