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