/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $product = $this->productRepository->productOfId($id); if (!$product) { return $this->respondNotFound('Product does not exist'); } $this->productRepository->delete($product); return $this->respond(['data' => $this->transform($product)]); }