forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerCreated.php
More file actions
56 lines (48 loc) · 1.54 KB
/
ServerCreated.php
File metadata and controls
56 lines (48 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace Pterodactyl\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class ServerCreated extends Notification implements ShouldQueue
{
use Queueable;
public $server;
/**
* Create a new notification instance.
*
* @param array $server
* @return void
*/
public function __construct(array $server)
{
$this->server = (object) $server;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->line('A new server as been assigned to your account.')
->line('Server Name: ' . $this->server->name)
->line('Memory: ' . $this->server->memory . ' MB')
->line('Node: ' . $this->server->node)
->line('Type: ' . $this->server->service . ' - ' . $this->server->option)
->action('Peel Off the Protective Wrap', route('server.index', $this->server->uuidShort))
->line('Please let us know if you have any additional questions or concerns!');
}
}