Files
pterodactyl-panel/app/Notifications/RemovedFromServer.php
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

50 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class RemovedFromServer extends Notification implements ShouldQueue
{
use Queueable;
/**
* Create a new notification instance.
*
* @param array{user: string, name: string} $server
*/
public function __construct(
public readonly array $server,
) {
$this->afterCommit();
}
/**
* Get the notification's delivery channels.
*
* @return list<string>
*/
public function via(): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*/
public function toMail(): MailMessage
{
return (new MailMessage)
->error()
->greeting('Hello '.$this->server['user'].'.')
->line('You have been removed as a subuser for the following server.')
->line('Server Name: '.$this->server['name'])
->action('Visit Panel', route('index'));
}
}