public function download($md5) { try { $sample = Sample::where('md5', $md5)->firstOrFail(); return Response::download($this->getFilePath($sample), $sample->filename . ".bin"); } catch (Exception $e) { return Response::json(404); } }
public function download($md5) { try { $sample = Sample::where('md5', $md5)->firstOrFail(); return Response::download($this->getFilePath($sample), $sample->filename . ".bin"); } catch (Exception $e) { return Response::json(404); } }