mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Events;
|
|
|
|
use Illuminate\Broadcasting\Channel;
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class ETLPurchaseOrderTransactionCompleteEvent implements ShouldBroadcast
|
|
{
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
/**
|
|
* True/false to indicate update status
|
|
*/
|
|
public $update;
|
|
|
|
/**
|
|
* The booking ID this event is for
|
|
*/
|
|
public $bookingId;
|
|
|
|
/**
|
|
* @param bool $update
|
|
* @param int $bookingId
|
|
*/
|
|
public function __construct($update, $bookingId)
|
|
{
|
|
$this->update = $update; // true or false
|
|
$this->bookingId = $bookingId; // unique booking identifier
|
|
}
|
|
|
|
/**
|
|
* Get the channels the event should broadcast on.
|
|
*
|
|
* @return \Illuminate\Broadcasting\Channel|array
|
|
*/
|
|
public function broadcastOn()
|
|
{
|
|
return new Channel('admin.pdf.1688.processing.' . $this->bookingId);
|
|
}
|
|
}
|