Verification.php 738 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace App\Notifications;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Notifications\Messages\MailMessage;
  5. use Illuminate\Notifications\Notification;
  6. class Verification extends Notification
  7. {
  8. use Queueable;
  9. private $code;
  10. public function __construct($code)
  11. {
  12. $this->code = $code;
  13. }
  14. public function via($notifiable)
  15. {
  16. return ['mail'];
  17. }
  18. public function toMail($notifiable)
  19. {
  20. return (new MailMessage)
  21. ->subject(trans('notification.verification_account'))
  22. ->line(trans('notification.verification'))
  23. ->line($this->code);
  24. }
  25. public function toArray($notifiable)
  26. {
  27. return [
  28. //
  29. ];
  30. }
  31. }