remove Mail use from Notifications classes
This commit is contained in:
@@ -26,10 +26,6 @@ class UserRegistered extends Notification implements ShouldBroadcast
|
||||
$channels[] = 'broadcast';
|
||||
}
|
||||
|
||||
if ($notifiable->email_notifications) {
|
||||
$channels[] = 'mail';
|
||||
}
|
||||
|
||||
return $channels;
|
||||
}
|
||||
|
||||
@@ -45,16 +41,4 @@ class UserRegistered extends Notification implements ShouldBroadcast
|
||||
{
|
||||
return new BroadcastMessage($this->toDatabase($notifiable));
|
||||
}
|
||||
|
||||
public function toMail($notifiable): MailMessage
|
||||
{
|
||||
Mail::to($notifiable->email)->send(new RegisterMail([
|
||||
'adminName' => $notifiable->name,
|
||||
'adminLastname'=> $notifiable->lastname,
|
||||
'userName' => $this->user->name,
|
||||
'userLastname' => $this->user->lastname,
|
||||
]));
|
||||
|
||||
return (new MailMessage);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user