WelcomeMessage.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace App\Notifications;
  3. use App\Models\Configuration;
  4. use App\Models\User;
  5. use Illuminate\Bus\Queueable;
  6. use Illuminate\Notifications\Notification;
  7. class WelcomeMessage extends Notification
  8. {
  9. use Queueable;
  10. /**
  11. * @var User
  12. */
  13. private $user;
  14. /**
  15. * Create a new notification instance.
  16. *
  17. * @param User $user
  18. */
  19. public function __construct(User $user)
  20. {
  21. $this->user = $user;
  22. }
  23. /**
  24. * Get the notification's delivery channels.
  25. *
  26. * @param mixed $notifiable
  27. * @return array
  28. */
  29. public function via($notifiable)
  30. {
  31. return ['database'];
  32. }
  33. /**
  34. * Get the array representation of the notification.
  35. *
  36. * @param mixed $notifiable
  37. * @return array
  38. */
  39. public function toArray($notifiable)
  40. {
  41. return [
  42. 'title' => "Getting started!",
  43. 'content' => "
  44. <p>Hello <strong>{$this->user->name}</strong>, Welcome to our dashboard!</p>
  45. <h5>Verification</h5>
  46. <p>Please verify your email address to get " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_EMAIL') . " extra credits and increase your server limit to " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') . "<br />You can also verify your discord account to get another " . Configuration::getValueByKey('CREDITS_REWARD_AFTER_VERIFY_DISCORD') . " credits and to increase your server limit again with " . Configuration::getValueByKey('SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') . "</p>
  47. <h5>Information</h5>
  48. <p>This dashboard can be used to create and delete servers.<br /> These servers can be used and managed on our pterodactyl panel.<br /> If you have any questions, please join our Discord server and #create-a-ticket.</p>
  49. <p>We hope you can enjoy this hosting experience and if you have any suggestions please let us know!</p>
  50. <p>Regards,<br />" . config('app.name', 'Laravel') . "</p>
  51. ",
  52. ];
  53. }
  54. }