Websitemail.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace App\Mail;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Contracts\Queue\ShouldQueue;
  5. use Illuminate\Mail\Mailable;
  6. use Illuminate\Mail\Mailables\Content;
  7. use Illuminate\Mail\Mailables\Envelope;
  8. use Illuminate\Queue\SerializesModels;
  9. class Websitemail extends Mailable
  10. {
  11. use Queueable, SerializesModels;
  12. /**
  13. * Create a new message instance.
  14. */
  15. public $subject, $body;
  16. public function __construct($subject,$body)
  17. {
  18. $this->subject = $subject;
  19. $this->body = $body;
  20. }
  21. /**
  22. * Get the message envelope.
  23. */
  24. public function envelope(): Envelope
  25. {
  26. return new Envelope(
  27. subject: $this->subject,
  28. );
  29. }
  30. /**
  31. * Get the message content definition.
  32. */
  33. public function content(): Content
  34. {
  35. return new Content(
  36. view: 'email'
  37. );
  38. }
  39. /**
  40. * Get the attachments for the message.
  41. *
  42. * @return array<int, \Illuminate\Mail\Mailables\Attachment>
  43. */
  44. public function attachments(): array
  45. {
  46. return [];
  47. }
  48. }