put('menu', 'member'); session()->put('title', 'Rechnungen versenden'); return Inertia::render('sendpayment/Form', [ 'links' => app(ActionFactory::class)->allLinks(), ]); } public function send(Request $request) { $repo = app(PdfRepositoryFactory::class)->forAll($request->type, 'Post'); $pdfFile = app(PdfGenerator::class)->setRepository($repo)->render(); app(PdfRepositoryFactory::class)->afterAll($request->type, 'Post'); return $repo === null ? response()->noContent() : $pdfFile; } }