remove Mail use from Notifications classes

This commit is contained in:
2026-03-28 16:37:02 +01:00
parent f13e96c7c7
commit 4c52fa5043
10 changed files with 91 additions and 111 deletions
-18
View File
@@ -33,10 +33,6 @@ class TaskDateUpdated extends Notification implements ShouldBroadcast
$channels[] = 'broadcast';
}
if ($notifiable->email_notifications) {
$channels[] = 'mail';
}
return $channels;
}
@@ -57,18 +53,4 @@ class TaskDateUpdated extends Notification implements ShouldBroadcast
{
return new BroadcastMessage($this->toDatabase($notifiable));
}
public function toMail($notifiable): void
{
Mail::to($notifiable->email)->send(new TaskDateUpdateMail([
'name' => $notifiable->name,
'lastname' => $notifiable->lastname,
'taskName' => $this->task->name,
'oldStart' => $this->oldStart,
'oldEnd' => $this->oldEnd,
'newStart' => $this->newStart,
'newEnd' => $this->newEnd,
'eventName' => $this->event->name,
]));
}
}