public function destroyMedicine(Medicine $medicine) { $medicine->delete(); }
public function showMedicine() { $medicines = Medicine::all(); return view("medicines.show", compact('medicines')); }
/** * 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'); }