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