/** * Remove the specified ElementSet from storage. * * @param int $id * * @return Response */ public function destroy($id) { $elementSet = $this->elementSetRepository->find($id); if (empty($elementSet)) { Flash::error('ElementSet not found'); return redirect(route('elementSets.index')); } $this->elementSetRepository->delete($id); Flash::success('ElementSet deleted successfully.'); return redirect(route('elementSets.index')); }
/** * Remove the specified ElementSet from storage. * DELETE /elementSets/{id} * * @param int $id * * @return Response */ public function destroy($id) { $this->elementSetRepository->apiDeleteOrFail($id); return $this->sendResponse($id, "ElementSet deleted successfully"); }