ManagementSystem/BACKEND/app/Events/PaymentCanceled.php

43 lines
992 B
PHP
Executable File

<?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 PaymentCanceled
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $payment_id;
public $email;
public $name;
/**
* Create a new event instance.
*/
public function __construct($payment_id, $email, $name)
{
$this->payment_id = $payment_id;
$this->email = $email;
$this->name = $name;
}
/**
* Get the channels the event should broadcast on.
*
* @return array<int, \Illuminate\Broadcasting\Channel>
*/
public function broadcastOn(): array
{
return [
new PrivateChannel('channel-name'),
];
}
}