Files
librenms-librenms/app/Events/PollingDevice.php

40 lines
791 B
PHP
Raw Normal View History

2021-11-17 19:23:55 -06:00
<?php
namespace App\Events;
use App\Models\Device;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class PollingDevice
{
use Dispatchable, InteractsWithSockets, SerializesModels;
/**
* @var \App\Models\Device
*/
public $device;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(Device $device)
{
$this->device = $device;
}
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
*/
public function broadcastOn()
{
return new PrivateChannel('channel-name');
}
}