ServerCreationError.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace App\Notifications;
  3. use App\Models\Server;
  4. use Illuminate\Bus\Queueable;
  5. use Illuminate\Notifications\Notification;
  6. class ServerCreationError extends Notification
  7. {
  8. use Queueable;
  9. /**
  10. * @var Server
  11. */
  12. private $server;
  13. /**
  14. * Create a new notification instance.
  15. *
  16. * @param Server $server
  17. */
  18. public function __construct(Server $server)
  19. {
  20. $this->server = $server;
  21. }
  22. /**
  23. * Get the notification's delivery channels.
  24. *
  25. * @param mixed $notifiable
  26. * @return array
  27. */
  28. public function via($notifiable)
  29. {
  30. return ['database'];
  31. }
  32. /**
  33. * Get the array representation of the notification.
  34. *
  35. * @param mixed $notifiable
  36. * @return array
  37. */
  38. public function toArray($notifiable)
  39. {
  40. return [
  41. 'title' => __('Server Creation Error'),
  42. 'content' => "
  43. <p>Hello <strong>{$this->server->User->name}</strong>, An unexpected error has occurred...</p>
  44. <p>There was a problem creating your server on our pterodactyl panel. There are likely no allocations or rooms left on the selected node. Please contact one of our support members through our discord server to get this resolved asap!</p>
  45. <p>We thank you for your patience and our deepest apologies for this inconvenience.</p>
  46. <p>".config('app.name', 'Laravel').'</p>
  47. ',
  48. ];
  49. }
  50. }