コード例 #1
0
 public function destroyMedicine(Medicine $medicine)
 {
     $medicine->delete();
 }
コード例 #2
0
 public function showMedicine()
 {
     $medicines = Medicine::all();
     return view("medicines.show", compact('medicines'));
 }
コード例 #3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  Medicine $medicine
  * @return \Illuminate\Http\Response
  */
 public function destroy(Medicine $medicine)
 {
     $medicine->delete();
     $medicines = Medicine::all();
     return ($returnPath = Session::get('backTo')) ? redirect($returnPath) : redirect('/medicine');
 }