Lae/app/Events/Servers.php

29 lines
524 B
PHP
Raw Permalink Normal View History

2022-09-22 06:00:03 +00:00
<?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
2023-01-10 12:47:04 +00:00
class Servers extends Event implements ShouldBroadcast
2022-09-22 06:00:03 +00:00
{
2022-09-22 12:07:38 +00:00
public array $data;
2022-09-22 06:00:03 +00:00
public string $type = 'servers.updated';
public function __construct($servers)
{
2022-09-22 12:07:38 +00:00
$this->data = $servers;
2022-09-22 06:00:03 +00:00
}
2022-12-11 11:33:34 +00:00
public function broadcastOn(): Channel
2022-09-22 06:00:03 +00:00
{
return new Channel('servers');
}
2023-02-11 18:01:37 +00:00
public function broadcastQueue(): string
{
return 'notifications';
}
2022-09-22 06:00:03 +00:00
}