AccountActivation.php 782 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Notifications;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Notifications\Messages\MailMessage;
  5. use Illuminate\Notifications\Notification;
  6. class AccountActivation extends Notification
  7. {
  8. use Queueable;
  9. private $url;
  10. public function __construct($url)
  11. {
  12. $this->url = $url;
  13. }
  14. public function via($notifiable)
  15. {
  16. return ['mail'];
  17. }
  18. public function toMail($notifiable)
  19. {
  20. return (new MailMessage)
  21. ->subject(__('Verify Email Address'))
  22. ->line(__('Please click the button below to verify your email address.'))
  23. ->action(__('Verify Your Email Address'), $this->url)
  24. ->line(__('If you did not create an account, no further action is required.'));
  25. }
  26. }