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