Participant mangement

This commit is contained in:
2026-04-11 22:17:38 +02:00
parent e6bd8c684d
commit ed7f887e3a
47 changed files with 1641 additions and 269 deletions

View File

@@ -0,0 +1,68 @@
<?php
namespace App\Mail\ParticipantParticipationMails;
use App\Models\EventParticipant;
use Illuminate\Http\Request;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
class ParticipantSignOffMail extends Mailable
{
public function __construct(
private EventParticipant $participant,
)
{
//
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
$participant = $this->participant->toResource()->toArray(new Request());
$subject = sprintf(
'Abmeldebestätigung %1$s %2$s',
'für die Veranstaltung',
$this->participant->event()->first()->name
);
return new Envelope(
subject: $subject,
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
$event = $this->participant->event()->first()->toResource()->toArray(new Request());
$participant = $this->participant->toResource()->toArray(new Request());
return new Content(
view: 'emails.events.participant_signed_off',
with: [
'name' => $participant['nicename'],
'eventTitle' => $event['name'],
'eventEmail' => $event['email'],
],
);
}
/**
* Get the attachments for the message.
*
* @return array<int, Attachment>
*/
public function attachments(): array
{
return [];
}
}