Ejemplo n.º 1
0
 /**
  * Store a newly created State in storage.
  *
  * @param CreateStateRequest $request
  *
  * @return Response
  */
 public function store(CreateStateRequest $request)
 {
     $input = $request->all();
     $state = $this->stateRepository->create($input);
     Flash::success('State saved successfully.');
     return redirect(route('states.index'));
 }
Ejemplo n.º 2
0
 /**
  * Update the specified resource in storage.
  *
  * @param CreateStateRequest $request
  * @param State $state
  * @return Response
  * @internal param int $id
  */
 public function update(CreateStateRequest $request, State $state)
 {
     $state->update($request->all());
     return redirect('/states/' . $state->id);
 }