diff --git a/app/Http/Controllers/ClientPortal/DownloadController.php b/app/Http/Controllers/ClientPortal/DownloadController.php index 00682336c0..6896fd43f1 100644 --- a/app/Http/Controllers/ClientPortal/DownloadController.php +++ b/app/Http/Controllers/ClientPortal/DownloadController.php @@ -32,12 +32,10 @@ class DownloadController extends Controller /** * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ - public function show(ShowDocumentRequest $request, $document) + public function show(ShowDocumentRequest $request, Document $download) { - $document = Document::findOrFail($document); - return render('downloads.show', [ - 'document' => $document, + 'document' => $download, ]); } } diff --git a/resources/views/portal/ninja2020/components/livewire/downloads-table.blade.php b/resources/views/portal/ninja2020/components/livewire/downloads-table.blade.php index 231c60b270..bc99dacc44 100644 --- a/resources/views/portal/ninja2020/components/livewire/downloads-table.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/downloads-table.blade.php @@ -72,7 +72,7 @@ - + {{ ctrans('texts.view') }}