Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppNotifications;
  4.  
  5. use IlluminateBusQueueable;
  6. use IlluminateNotificationsNotification;
  7. use IlluminateContractsQueueShouldQueue;
  8. use IlluminateNotificationsMessagesMailMessage;
  9.  
  10. class VerifyEmailNotification extends Notification implements ShouldQueue
  11. {
  12. use Queueable;
  13.  
  14. protected $token;
  15.  
  16. /**
  17. * Create a new notification instance.
  18. *
  19. * @return void
  20. */
  21. public function __construct($token)
  22. {
  23. $this->token = $token;
  24. }
  25.  
  26. /**
  27. * Get the notification's delivery channels.
  28. *
  29. * @param mixed $notifiable
  30. * @return array
  31. */
  32. public function via($notifiable)
  33. {
  34. return ['mail'];
  35. }
  36.  
  37. /**
  38. * Get the mail representation of the notification.
  39. *
  40. * @param mixed $notifiable
  41. * @return IlluminateNotificationsMessagesMailMessage
  42. */
  43. public function toMail($notifiable)
  44. {
  45. return (new MailMessage)
  46. ->subject(config('constants.title') . ' - Please Verify Your Email')
  47. ->line('You are receiving this email because you have sign up on ' . config('constants.title') . '.')
  48. ->action('Verify Email', url(config('app.url').route('verify_email', ['token' => $this->token], false)))
  49. ->line('If you did not sign up on ' . config('constants.title') . ', no further action is required.');
  50. }
  51.  
  52. /**
  53. * Get the array representation of the notification.
  54. *
  55. * @param mixed $notifiable
  56. * @return array
  57. */
  58. public function toArray($notifiable)
  59. {
  60. return [
  61. //
  62. ];
  63. }
  64. }
  65.  
  66. php artisan view:clear
  67.  
  68. php artisan queue:restart
  69.  
  70. php artisan config:cache
  71.  
  72. supervisorctl restart all
  73.  
  74. php artisan queue:restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement