コード例 #1
0
 /**
  * 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'));
 }
コード例 #2
0
 /**
  * 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");
 }