AccountActivation.php 826 B

12345678910111213141516171819202122232425262728293031323334
  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 AccountActivation extends Notification
  8. {
  9. use Queueable;
  10. private $url;
  11. public function __construct($url)
  12. {
  13. $this->url = $url;
  14. }
  15. public function via($notifiable)
  16. {
  17. return ['mail'];
  18. }
  19. public function toMail($notifiable)
  20. {
  21. return (new MailMessage)
  22. ->subject(__('Verify Email Address'))
  23. ->line(__('Please click the button below to verify your email address.'))
  24. ->action(__('Verify Your Email Address'), $this->url)
  25. ->line(__('If you did not create an account, no further action is required.'));
  26. }
  27. }