delete TaskDateUpdated event
This commit is contained in:
@@ -1,53 +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 TaskDateUpdated implements ShouldBroadcastNow
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
public $task;
|
||||
public $event;
|
||||
public $start;
|
||||
public $end;
|
||||
public $notificationId;
|
||||
protected $userId;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*/
|
||||
public function __construct($userId, Task $task, Event $event, $start, $end, $notificationId)
|
||||
{
|
||||
$this->userId = $userId;
|
||||
$this->task = $task;
|
||||
$this->event = $event;
|
||||
$this->start = $start;
|
||||
$this->end = $end;
|
||||
$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 'task.date.updated';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user