Beispiel #1
0
 public function showFile($id)
 {
     $file = OrderFiles::where('hash', '=', $id)->firstOrFail();
     $filePath = 'files/uploads/' . $file->hash . '.' . $file->extension;
     $headers = array('Content-Type' => $file->mime);
     return response()->download($filePath, $file->name, $headers);
 }