Fix route model binding

This commit is contained in:
Benjamin Beganović 2020-08-18 14:38:46 +02:00
parent d58ab5d613
commit acdd9c936c
2 changed files with 3 additions and 5 deletions

View File

@ -32,12 +32,10 @@ class DownloadController extends Controller
/** /**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @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', [ return render('downloads.show', [
'document' => $document, 'document' => $download,
]); ]);
} }
} }

View File

@ -72,7 +72,7 @@
</a> </a>
</td> </td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"> <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
<a href="{{ route('client.downloads.show', $download->id) }}" class="button-link"> <a href="{{ route('client.downloads.show', $download->hashed_id) }}" class="button-link">
{{ ctrans('texts.view') }} {{ ctrans('texts.view') }}
</a> </a>
</td> </td>