delete VolunteerUnassignedFromTask event
This commit is contained in:
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Events;
|
|
||||||
|
|
||||||
use App\Models\Event;
|
|
||||||
use App\Models\Task;
|
|
||||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
||||||
use Illuminate\Broadcasting\PrivateChannel;
|
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
|
||||||
use Illuminate\Foundation\Events\Dispatchable;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
|
|
||||||
class VolunteerUnassignedFromTask implements ShouldBroadcastNow
|
|
||||||
{
|
|
||||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
||||||
|
|
||||||
public $userId;
|
|
||||||
public $task;
|
|
||||||
public $event;
|
|
||||||
public $notificationId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new event instance.
|
|
||||||
*/
|
|
||||||
public function __construct($userId, Task $task, Event $event, $notificationId)
|
|
||||||
{
|
|
||||||
$this->userId = $userId;
|
|
||||||
$this->task = $task;
|
|
||||||
$this->event = $event;
|
|
||||||
$this->notificationId = $notificationId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the channels the event should broadcast on.
|
|
||||||
*
|
|
||||||
* @return array<int, \Illuminate\Broadcasting\Channel>
|
|
||||||
*/
|
|
||||||
public function broadcastOn(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
new PrivateChannel('user.' . $this->userId),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function broadcastAs()
|
|
||||||
{
|
|
||||||
return 'volunteer.unassigned.to.task';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user