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