39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Events\PainelSenha;
|
|
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
|
|
class FilaEvent implements ShouldBroadcastNow
|
|
{
|
|
use Dispatchable, InteractsWithSockets;
|
|
|
|
private $setorTipoId = null;
|
|
private $centroCustoId = null;
|
|
private $moduloIdentificador = null;
|
|
public $salaId = null;
|
|
public $fila = null;
|
|
|
|
public function __construct($setorTipoId, $centroCustoId, $moduloIdentificador, $fila, $salaId = null)
|
|
{
|
|
$this->setorTipoId = $setorTipoId;
|
|
$this->centroCustoId = $centroCustoId;
|
|
$this->moduloIdentificador = $moduloIdentificador;
|
|
$this->salaId = $salaId;
|
|
$this->fila = $fila;
|
|
}
|
|
|
|
public function broadcastOn()
|
|
{
|
|
return new PrivateChannel(app('config')->get('database.default') . '-painel-senha-fila');
|
|
}
|
|
|
|
public function broadcastAs()
|
|
{
|
|
return "{$this->setorTipoId}.{$this->centroCustoId}.{$this->moduloIdentificador}.updated";
|
|
}
|
|
}
|