remove Mail use from Notifications classes
This commit is contained in:
@@ -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,
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user