%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/loslex/production/app/Mail/
Upload File :
Create Path :
Current File : /www/loslex/production/app/Mail/RegistrationDeletedMail.php

<?php

namespace App\Mail;

use App\Enums\RegistrationDeletionReason;
use App\Models\Registration;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\App;

class RegistrationDeletedMail extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(public Registration $registration, public RegistrationDeletionReason $deletionReason)
    {
    }

    public function envelope(): Envelope
    {
        return new Envelope(
            replyTo: $this->registration->contest->organizerEmail ? $this->registration->contest->organizerEmail : $this->registration->contest->director->email,
            subject: __('Registration for contest :name has been deleted', ['name' => $this->registration->contest->contestname]),
        );
    }

    public function content(): Content
    {
        return new Content(
            markdown: 'emails.registration.deleted-' . App::getLocale(),
        );
    }

    public function attachments(): array
    {
        return [];
    }
}

Zerion Mini Shell 1.0