Refactor setNotificationChannels method in DeploymentSuccess.php

This commit is contained in:
Andras Bacsai 2024-04-30 15:06:53 +02:00
parent 70e1ec2cd2
commit 17e81ab6bd

View File

@ -43,15 +43,8 @@ public function __construct(Application $application, string $deployment_uuid, A
public function via(object $notifiable): array
{
$channels = setNotificationChannels($notifiable, 'deployments');
if (isCloud()) {
$channels = array_filter($channels, function ($channel) {
return $channel !== 'App\Notifications\Channels\EmailChannel';
});
}
return $channels;
return setNotificationChannels($notifiable, 'deployments');
}
public function toMail(): MailMessage
{
$mail = new MailMessage();