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
*/
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,
]);
}
}

View File

@ -72,7 +72,7 @@
</a>
</td>
<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') }}
</a>
</td>