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
-15
View File
@@ -25,10 +25,6 @@ class EventDeleted extends Notification implements ShouldBroadcast
$channels[] = 'broadcast';
}
if ($notifiable->email_notifications) {
$channels[] = 'mail';
}
return $channels;
}
@@ -44,15 +40,4 @@ class EventDeleted extends Notification implements ShouldBroadcast
{
return new BroadcastMessage($this->toDatabase($notifiable));
}
public function toMail($notifiable): void
{
Mail::to($notifiable->email)->send(new EventParticipationCancelledMail([
'name' => $notifiable->name,
'lastname' => $notifiable->lastname,
'eventName' => $this->event->name,
'start' => $this->event->start,
'end' => $this->event->end,
]));
}
}