mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 18:01:37 +00:00
* WIP notifications and other refactors - refactor notification channels - send notifications on events related to the servers and sites - delete server log files on server deletion - add telegram notification channel - add new icons - cache configs and icons on installation and updates - new navbar for dark mode and settings * discord channel * build assets * pint
37 lines
903 B
PHP
37 lines
903 B
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Contracts\Notification as NotificationInterface;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
abstract class AbstractNotification extends Notification implements NotificationInterface, ShouldQueue
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
return (new MailMessage())
|
|
->line($this->rawText());
|
|
}
|
|
|
|
public function toSlack(object $notifiable): string
|
|
{
|
|
return $this->rawText();
|
|
}
|
|
|
|
public function toDiscord(object $notifiable): string
|
|
{
|
|
return $this->rawText();
|
|
}
|
|
|
|
public function toTelegram(object $notifiable): string
|
|
{
|
|
return $this->rawText();
|
|
}
|
|
}
|