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
@@ -24,10 +24,6 @@ class VolunteerRoleUpdated extends Notification implements ShouldBroadcast
$channels[] = 'broadcast';
}
if ($notifiable->email_notifications) {
$channels[] = 'mail';
}
return $channels;
}
@@ -43,13 +39,4 @@ class VolunteerRoleUpdated extends Notification implements ShouldBroadcast
{
return new BroadcastMessage($this->toDatabase($notifiable));
}
public function toMail($notifiable): void
{
Mail::to($notifiable->email)->send(new UpdateRoleMail([
'name' => $notifiable->name,
'lastname' => $notifiable->lastname,
'role' => $this->role,
]));
}
}