/**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     return $this->service->update($request->all(), $id);
     // $client = new Client();
     //$client->update($request->all());
     // return $client;
 }
 public function update(Request $request, $id)
 {
     try {
         $this->service->update($request->all(), $id);
     } catch (\Exception $e) {
         return 'Erro ao realizar atualização: ' . $e->getMessage();
     }
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  Request $request
  * @param  int $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     try {
         return $this->service->update($request->all(), $id);
         //$this->repository->find($id)->update($request->all());
     } catch (ValidatorException $e) {
         Response::json(['error' => true, 'message' => $e->getMessageBag()], 400);
     }
 }
Пример #4
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     //return Client::find($id)->update($request->all());
     //return $this->repository->update($request->all(), $id);
     //return $this->service->update($request->all(), $id);
     try {
         return $this->service->update($request->all(), $id);
     } catch (ModelNotFoundException $e) {
         return ['error' => true, 'message' => 'Não foi possível atualizar o cliente! Cliente não encontrado!'];
     }
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     /*$client = Client::find($id); //consulta dos dados
     
             $client->update($request->all(),$id); //atualiza os dados
     
             return $client; //retornar os dados para serialização em JSON*/
     //return Client::find($id)->update($request->all());
     //return $this->repository->update($request->all(), $id);
     return $this->service->update($request->all(), $id);
 }
Пример #6
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $client = $this->repository->findOrFail($id);
     if (!is_object($client)) {
         return $client;
     }
     return $this->service->update($request->all(), $id);
 }
Пример #7
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     return $this->service->update($request->all(), $id);
     /*
     $result = $this->repository->find($id)->update($request->all());
     if($result)
         return ['error' => 0];
     return  ['error' => 1, 'msg' => 'Erro ao tentar atualizar o Cliente'];
     */
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     $this->service->update($request->all(), $id);
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id, $taskId)
 {
     return $this->service->update($request->all(), $taskId);
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     return $this->service->update($request->all(), $id);
     //return $this->repository->find($id);
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     //Client::find($id)->update($request->all());
     return $this->service->update($request->all(), $id);
 }