PhyrePanel-mirror/web/app/Events/ModuleIsInstalled.php
2024-04-26 23:26:05 +03:00

37 lines
863 B
PHP

<?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class ModuleIsInstalled
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $module;
/**
* Create a new event instance.
*/
public function __construct($model)
{
$this->module = $model;
}
/**
* Get the channels the event should broadcast on.
*
* @return array<int, \Illuminate\Broadcasting\Channel>
*/
public function broadcastOn(): array
{
return [
new PrivateChannel('channel-name'),
];
}
}