Handling of event addons
This commit is contained in:
@@ -96,6 +96,10 @@ class EventParticipantResource extends JsonResource
|
||||
'eventName' => $this->resource->event()->first()->name,
|
||||
'arrivalDateReadable' => $this->resource->arrival_date->format('d.m.Y'),
|
||||
'departureDateReadable' => $this->resource->departure_date->format('d.m.Y'),
|
||||
'participationOptions' => $this->resource->selectedOptions()->get()->map(
|
||||
fn($option) => new EventParticipantOptionResource($option)->toArray($request))->toArray(),
|
||||
'selectedAddons' => $this->resource->selectedAddons()->get()->map(
|
||||
fn($addon) => new EventParticipantAddonResource($addon)->toArray($request))->toArray(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user