コード例 #1
0
 /**
  * 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');
 }
コード例 #2
0
 /**
  * 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');
 }
コード例 #3
0
ファイル: LibraryController.php プロジェクト: a5526000/LIMS
 /**
  * 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!');
 }