Verification.php 844 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. ->line(trans('notification.verification_limit', ['minutes' => config('tasks.close.verify')]));
  25. }
  26. public function toArray($notifiable)
  27. {
  28. return [
  29. //
  30. ];
  31. }
  32. }