From 50ad75b5167285f0859c02e86c81eda94efb4937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 10 May 2021 13:35:38 +0200 Subject: [PATCH] Fix the wrong variable reference --- app/Http/Controllers/ClientPortal/QuoteController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ClientPortal/QuoteController.php b/app/Http/Controllers/ClientPortal/QuoteController.php index cf73519e12e6..a7d6354eeecc 100644 --- a/app/Http/Controllers/ClientPortal/QuoteController.php +++ b/app/Http/Controllers/ClientPortal/QuoteController.php @@ -76,9 +76,9 @@ class QuoteController extends Controller } if ($quotes->count() == 1) { - return response()->streamDownload(function () use ($invoices) { - echo file_get_contents($invoices->first()->pdf_file_path()); - }, basename($invoices->first()->pdf_file_path()), ['Cache-Control:' => 'no-cache']); + return response()->streamDownload(function () use ($quotes) { + echo file_get_contents($quotes->first()->pdf_file_path()); + }, basename($quotes->first()->pdf_file_path()), ['Cache-Control:' => 'no-cache']); //return response()->download(TempFile::path($invoices->first()->pdf_file_path()), basename($quotes->first()->pdf_file_path())); }