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