Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Notifications/RemovedFromServer.php
7432 views
1
<?php
2
3
namespace Pterodactyl\Notifications;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Notifications\Notification;
7
use Illuminate\Contracts\Queue\ShouldQueue;
8
use Illuminate\Notifications\Messages\MailMessage;
9
10
class RemovedFromServer extends Notification implements ShouldQueue
11
{
12
use Queueable;
13
14
public object $server;
15
16
/**
17
* Create a new notification instance.
18
*/
19
public function __construct(array $server)
20
{
21
$this->server = (object) $server;
22
}
23
24
/**
25
* Get the notification's delivery channels.
26
*/
27
public function via(): array
28
{
29
return ['mail'];
30
}
31
32
/**
33
* Get the mail representation of the notification.
34
*/
35
public function toMail(): MailMessage
36
{
37
return (new MailMessage())
38
->error()
39
->greeting('Hello ' . $this->server->user . '.')
40
->line('You have been removed as a subuser for the following server.')
41
->line('Server Name: ' . $this->server->name)
42
->action('Visit Panel', route('index'));
43
}
44
}
45
46