eventParticipants->getByIdentifier($participantIdentifier, $this->events); $cocRequest = new ManualCertificateOfConductionCheckRequest($participant); $cocCommand = new ManualCertificateOfConductionCheckCommand($cocRequest); $cocResponse = $cocCommand->execute(); return response()->json([ 'status' => $cocResponse->success ? 'success' : 'error', 'message' => $cocResponse->success ? 'Das eFZ wurde als gültig hinterlegt' : 'Beim Aktualisieren des eFZ-Status ist ein Fehler aufgetreten.' ]); } public function __invoke(string $participantIdentifier, Request $request) { $participant = $this->eventParticipants->getByIdentifier($participantIdentifier, $this->events)->toResource()->toArray($request); return response()->json([ 'participant' => $participant, ]); } }