Ejemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int      $id
  * @return Response
  */
 public function update(UpdateClientRequest $request)
 {
     $client = $this->clientService->save($request->input(), $request->entity());
     Session::flash('message', trans('texts.updated_client'));
     return redirect()->to($client->getRoute());
 }
 /**
  * @SWG\Delete(
  *   path="/clients/{client_id}",
  *   tags={"client"},
  *   summary="Delete a client",
  *   @SWG\Parameter(
  *     in="body",
  *     name="body",
  *     @SWG\Schema(ref="#/definitions/Client")
  *   ),
  *   @SWG\Response(
  *     response=200,
  *     description="Delete client",
  *      @SWG\Schema(type="object", @SWG\Items(ref="#/definitions/Client"))
  *   ),
  *   @SWG\Response(
  *     response="default",
  *     description="an ""unexpected"" error"
  *   )
  * )
  */
 public function destroy(UpdateClientRequest $request)
 {
     $client = $request->entity();
     $this->clientRepo->delete($client);
     return $this->itemResponse($client);
 }