This commit is contained in:
Andras Bacsai
2023-06-12 12:00:01 +02:00
parent b097842d01
commit a97d22b81b
36 changed files with 364 additions and 202 deletions

View File

@@ -12,20 +12,6 @@ use Illuminate\Notifications\Notification;
class TestNotification extends Notification implements ShouldQueue
{
use Queueable;
/**
* Create a new notification instance.
*/
public function __construct()
{
//
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
$channels = [];
@@ -33,11 +19,7 @@ class TestNotification extends Notification implements ShouldQueue
$notifiable->extra_attributes?->get('discord_active') && $channels[] = DiscordChannel::class;
return $channels;
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
public function toMail(): MailMessage
{
return (new MailMessage)
->subject('Coolify Test Notification')
@@ -45,20 +27,8 @@ class TestNotification extends Notification implements ShouldQueue
->line('You have successfully received a test Email notification from Coolify. 🥳');
}
public function toDiscord(object $notifiable): string
public function toDiscord(): string
{
return 'You have successfully received a test Discord notification from Coolify. 🥳 [Go to your dashboard](' . url('/') . ')';
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(object $notifiable): array
{
return [
//
];
}
}