/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $library = Library::findOrFail($id); $library->delete(); return view('admin/libraries'); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $library = Library::findOrFail($id); try { File::delete(public_path() . '/uploads/library/' . $library->image); $library->destroy($id); } catch (Exception $e) { App::abort(404); } return Redirect::route('admin.library.show'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { // $user = \Auth::user(); $library = Library::findOrFail($id); $POrecord = $library->POrecord; $POrecord->status = 'QualityControl'; $POrecord->save(); $project = $POrecord->project; Library_Samples::where('library_id', '=', $library->id)->delete(); $library->delete(); return \Redirect::to('research/ngs/projects/show/' . $project->id)->with('message', 'Your Library has been deleted!'); }