validated('event_id')); if ($event->isSubEvent()) { $event = $event->parent; } $person = Person::where('user_id', $request->user()->id) ->where('event_id', $event->id) ->with([ 'crowdType', 'shiftAssignments.shift.festivalSection', 'shiftAssignments.shift.timeSlot', 'volunteerAvailabilities.timeSlot', 'fieldValues.registrationFormField', 'sectionPreferences.festivalSection', ]) ->first(); if (! $person) { return $this->notFound('No registration found for this event'); } return $this->success(new PersonResource($person)); } }