events->getById($eventId); if ($event === null) { return response()->json(['status' => 'error', 'message' => 'Die Veranstaltung wurde nicht gefunden.']); } $response = new BookBankStatementPaymentsCommand(new BookBankStatementPaymentsRequest( event: $event, bookings: (array) $request->input('bookings', []), ))->execute(); return response()->json([ 'status' => $response->success ? 'success' : 'error', 'message' => $response->message, 'booked' => $response->booked, 'skipped' => $response->skipped, 'failed' => $response->failed, ]); } }