AdminResetPassword.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App\Notifications;
  3. use Illuminate\Notifications\Notification;
  4. use Illuminate\Notifications\Messages\MailMessage;
  5. class AdminResetPassword extends Notification
  6. {
  7. /**
  8. * The password reset token.
  9. *
  10. * @var string
  11. */
  12. public $token;
  13. /**
  14. * Create a new notification instance.
  15. *
  16. * @param $token
  17. */
  18. public function __construct($token)
  19. {
  20. $this->token = $token;
  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('You are receiving this email because we received a password reset request for your account.')
  42. ->action('Reset Password', url('admin/password/reset', $this->token))
  43. ->line('If you did not request a password reset, no further action is required.');
  44. }
  45. }