put('menu', 'member'); session()->put('title', 'Rechnungen versenden'); return Inertia::render('sendpayment/VForm', [ 'types' => app(ActionFactory::class)->allLinks(), ]); } /** * @return Response|Responsable */ public function send(Request $request) { $memberCollection = (new BillKindQuery(BillKind::POST))->type($request->type)->getMembers(); if ($memberCollection->isEmpty()) { return response()->noContent(); } $documents = $memberCollection->map(function ($members) use ($request) { $document = $request->type::fromMembers($members); app(DocumentFactory::class)->afterSingle($document, $members); return $document; }); return Tex::merge($documents->all()); } }