コード例 #1
0
 /**
  * Remove the specified ProductCost from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $productCost = $this->productCostRepository->find($id);
     if (empty($productCost)) {
         Flash::error('ProductCost not found');
         return redirect(route('productCosts.index'));
     }
     $this->productCostRepository->delete($id);
     Flash::success('ProductCost deleted successfully.');
     return redirect(route('productCosts.index'));
 }
コード例 #2
0
 /**
  * Remove the specified ProductCost from storage.
  * DELETE /productCosts/{id}
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $this->productCostRepository->apiDeleteOrFail($id);
     return $this->sendResponse($id, "ProductCost deleted successfully");
 }