remove VolunteerAssignedToTask event

This commit is contained in:
2026-03-28 15:34:16 +01:00
parent f31b92e0d3
commit b9283136ba
-49
View File
@@ -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 VolunteerAssignedToTask implements ShouldBroadcastNow
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $task;
public $event;
public $notificationId;
protected $userId;
/**
* 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.assigned.to.task';
}
}