public function img($id) { // $QC_Samples = QC_Samples::find($id); $filepath = $QC_Samples->figure_Path; return response()->download($filepath); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { // $user = \Auth::user(); $qualityControl = qualityControl::findOrFail($id); $POrecord = $qualityControl->POrecord; $POrecord->status = 'Extraction'; $POrecord->save(); $project = $POrecord->project; QC_Samples::where('qualityControl_id', '=', $qualityControl->id)->delete(); $qualityControl->delete(); return \Redirect::to('research/ngs/projects/show/' . $project->id)->with('message', 'Your Quality Control has been deleted!'); }