Fhernd icon

AssignmentCreated.php

Fhernd | PRO | 07/10/25 06:34:32 PM UTC | 0 ⭐ | 10669 👁️ | Never ⏰ | []
PHP |

900 B

|

Source Code

|

0 👍

/

0 👎

<?php
 
namespace App\Mail;
 
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
 
class AssignmentCreated extends Mailable
{
    use Queueable, SerializesModels;
 
    public function __construct(public $trainer, public $trainee) {}
 
    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'New assignment from ' . $this->trainer->name,
            from: new Address($this->trainer->email, $this->trainer->name),
        );
    }
 
    public function content(): Content
    {
        return new Content(
            view: 'emails.assignment-created'
        );
    }
 
    public function attachments(): array
    {
        return [];
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎