Advertisement
Rudi_S

BlogPosted (Mail.php)

Jun 2nd, 2023
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | Source Code | 0 0
  1. <?php
  2.  
  3. namespace App\Mail;
  4.  
  5. use Illuminate\Bus\Queueable;
  6. use Illuminate\Contracts\Queue\ShouldQueue;
  7. use Illuminate\Mail\Mailable;
  8. use Illuminate\Mail\Mailables\Address;
  9. use Illuminate\Mail\Mailables\Content;
  10. use Illuminate\Mail\Mailables\Envelope;
  11. use Illuminate\Queue\SerializesModels;
  12.  
  13. class BlogPosted extends Mailable
  14. {
  15.     use Queueable, SerializesModels;
  16.  
  17.     /**
  18.      * Create a new message instance.
  19.      */
  20.     public function __construct()
  21.     {
  22.         //
  23.     }
  24.  
  25.     /**
  26.      * Get the message envelope.
  27.      */
  28.     public function envelope(): Envelope
  29.     {
  30.         return new Envelope(
  31.             from: new Address('idursupra@gmail.com', 'Rudi'),
  32.             subject: 'Blog Baru',
  33.         );
  34.     }
  35.  
  36.     /**
  37.      * Get the message content definition.
  38.      */
  39.     public function content(): Content
  40.     {
  41.         return new Content(
  42.             view: 'mails.blog_posted',
  43.         );
  44.     }
  45.  
  46.     /**
  47.      * Get the attachments for the message.
  48.      *
  49.      * @return array<int, \Illuminate\Mail\Mailables\Attachment>
  50.      */
  51.     public function attachments(): array
  52.     {
  53.         return [];
  54.     }
  55. }
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement