/**
  * Store a newly created ProductDetail in storage.
  *
  * @param CreateProductDetailRequest $request
  *
  * @return Response
  */
 public function store(CreateProductDetailRequest $request)
 {
     $input = $request->all();
     $productDetail = $this->productDetailRepository->create($input);
     Flash::success('ProductDetail saved successfully.');
     return redirect(route('productDetails.index'));
 }
 /**
  * Store a newly created ProductDetail in storage.
  * POST /productDetails
  *
  * @param Request $request
  *
  * @return Response
  */
 public function store(Request $request)
 {
     if (sizeof(ProductDetail::$rules) > 0) {
         $this->validateRequestOrFail($request, ProductDetail::$rules);
     }
     $input = $request->all();
     $productDetails = $this->productDetailRepository->create($input);
     return $this->sendResponse($productDetails->toArray(), "ProductDetail saved successfully");
 }