Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

chore: use new notification trait

peaklabs-dev96c970ca4ea8
diff --git a/app/Notifications/Test.php b/app/Notifications/Test.php
index 03f6c32960..7ae1c52860 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 @@ class Test extends Notification implements ShouldQueue
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 => [],
};
}