My SMM panel
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

ChangeEmail.php 1.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace App\Notifications;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Contracts\Queue\ShouldQueue;
  5. use Illuminate\Notifications\Messages\MailMessage;
  6. use Illuminate\Notifications\Notification;
  7. class ChangeEmail extends Notification
  8. {
  9. use Queueable;
  10. private $link;
  11. private $email;
  12. /**
  13. * Create a new notification instance.
  14. *
  15. * @return void
  16. */
  17. public function __construct($link, $email)
  18. {
  19. $this->link = $link;
  20. $this->email = $email;
  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 ['mail'];
  31. }
  32. /**
  33. * Get the mail representation of the notification.
  34. *
  35. * @param mixed $notifiable
  36. * @return \Illuminate\Notifications\Messages\MailMessage
  37. */
  38. public function toMail($notifiable)
  39. {
  40. return (new MailMessage)
  41. ->line('An email change has been requested. Please confirm your new address by clicking the link below.')
  42. ->action('Confirm', $this->link)
  43. ->to($this->email)
  44. ->line('If you do not recognize this activity, please disregard this email.');
  45. }
  46. /**
  47. * Get the array representation of the notification.
  48. *
  49. * @param mixed $notifiable
  50. * @return array
  51. */
  52. public function toArray($notifiable)
  53. {
  54. return [
  55. //
  56. ];
  57. }
  58. }