From d5a5d47976cc7142fbe48c8ff8c65e0fdb2bcea7 Mon Sep 17 00:00:00 2001
From: Dominik Hebeler <dominik@suma-ev.de>
Date: Tue, 18 Feb 2020 10:34:47 +0100
Subject: [PATCH] membership form now is a file download

---
 routes/web.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/routes/web.php b/routes/web.php
index 9439cf853..16b658253 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -87,9 +87,9 @@ Route::group(
 
         Route::get('beitritt', function () {
             if (LaravelLocalization::getCurrentLocale() === "de") {
-                return response()->file(storage_path('app/public/aufnahmeantrag-de.pdf'));
+                return response()->download(storage_path('app/public/aufnahmeantrag-de.pdf'), "SUMA-EV_Beitrittsformular_" . (new \DateTime())->format("Y_m_d") . ".pdf", ["Content-Type" => "application/pdf"]);
             } else {
-                return response()->file(storage_path('app/public/aufnahmeantrag-en.pdf'));
+                return response()->download(storage_path('app/public/aufnahmeantrag-en.pdf'), "SUMA-EV_Membershipform_" . (new \DateTime())->format("Y_m_d") . ".pdf", ["Content-Type" => "application/pdf"]);
             }
         });
 
-- 
GitLab