SendCodeMail.php 764 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Mail;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Mail\Mailable;
  5. use Illuminate\Mail\Mailables\Content;
  6. use Illuminate\Mail\Mailables\Envelope;
  7. use Illuminate\Queue\SerializesModels;
  8. class SendCodeMail extends Mailable
  9. {
  10. use Queueable, SerializesModels;
  11. public function __construct(
  12. public readonly string $code,
  13. public readonly string $recipientName = '',
  14. ) {}
  15. public function envelope(): Envelope
  16. {
  17. return new Envelope(
  18. subject: __('mail.send_code.subject'),
  19. );
  20. }
  21. public function content(): Content
  22. {
  23. return new Content(
  24. view: 'emails.send_code',
  25. );
  26. }
  27. public function attachments(): array
  28. {
  29. return [];
  30. }
  31. }