From 96c970ca4ea87210730881e988e5acb94bdce902 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:44:43 +0100 Subject: [PATCH] chore: use new notification trait --- app/Notifications/Test.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Notifications/Test.php b/app/Notifications/Test.php index 03f6c3296..7ae1c5286 100644 --- a/app/Notifications/Test.php +++ b/app/Notifications/Test.php @@ -2,6 +2,7 @@ namespace App\Notifications; +use App\Notifications\Channels\EmailChannel; use App\Notifications\Dto\DiscordMessage; use App\Notifications\Dto\SlackMessage; use Illuminate\Bus\Queueable; @@ -23,13 +24,13 @@ public function __construct(public ?string $emails = null) public function via(object $notifiable): array { - return setNotificationChannels($notifiable, 'test'); + return $notifiable->getEnabledChannels('test'); } public function middleware(object $notifiable, string $channel) { return match ($channel) { - \App\Notifications\Channels\EmailChannel::class => [new RateLimited('email')], + EmailChannel::class => [new RateLimited('email')], default => [], }; }