コード例 #1
0
 /**
  * Store a newly created StateBill in storage.
  *
  * @param CreateStateBillRequest $request
  *
  * @return Response
  */
 public function store(CreateStateBillRequest $request)
 {
     $input = $request->all();
     $stateBill = $this->stateBillRepository->create($input);
     Flash::success('StateBill saved successfully.');
     return redirect(route('stateBills.index'));
 }
コード例 #2
0
 /**
  * Store a newly created StateBill in storage.
  * POST /stateBills
  *
  * @param Request $request
  *
  * @return Response
  */
 public function store(Request $request)
 {
     if (sizeof(StateBill::$rules) > 0) {
         $this->validateRequestOrFail($request, StateBill::$rules);
     }
     $input = $request->all();
     $stateBills = $this->stateBillRepository->create($input);
     return $this->sendResponse($stateBills->toArray(), "StateBill saved successfully");
 }