feat: use new notification event names

This commit is contained in:
peaklabs-dev
2024-12-09 16:57:15 +01:00
parent bc726ddd6e
commit b6500142c4
12 changed files with 75 additions and 150 deletions

View File

@@ -5,8 +5,8 @@ namespace App\Notifications\Database;
use App\Models\ScheduledDatabaseBackup;
use App\Notifications\CustomEmailNotification;
use App\Notifications\Dto\DiscordMessage;
use Illuminate\Notifications\Messages\MailMessage;
use App\Notifications\Dto\SlackMessage;
use Illuminate\Notifications\Messages\MailMessage;
class BackupSuccess extends CustomEmailNotification
{
@@ -24,7 +24,7 @@ class BackupSuccess extends CustomEmailNotification
public function via(object $notifiable): array
{
return setNotificationChannels($notifiable, 'database_backups');
return $notifiable->getEnabledChannels('backup_success');
}
public function toMail(): MailMessage
@@ -64,7 +64,7 @@ class BackupSuccess extends CustomEmailNotification
public function toSlack(): SlackMessage
{
$title = "Database backup successful";
$title = 'Database backup successful';
$description = "Database backup for {$this->name} (db:{$this->database_name}) was successful.";
$description .= "\n\n**Frequency:** {$this->frequency}";