app/Http/Controllers/ProvedorController.php
/**
   * Update the specified resource in storage.
   *
   * @param  \Illuminate\Http\Request  $request
   * @param  int  $id
   * @return \Illuminate\Http\Response
   */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
  {
    $provedor = Provedor::find($id);
    $provedor->fill($request->all());
    if ($provedor->save()) {
      return response()->json($this->messages['update.success'], Response::HTTP_OK);
    }
    return response()->json($this->messages['update.fail'], Response::HTTP_CONFLICT);
  }
public function update ( Request $ request , $ id ) { $ provedor = Provedor :: find ( $ id ) ; $ provedor -> fill ( $ request -> all ( ) ) ; if ( $ provedor -> save ( ) ) { return response ( ) -> json ( $ this -> messages [ 'update.success' ] , Response :: HTTP_OK ) ; } return response ( ) -> json ( $ this -> messages [ 'update.fail' ] , Response :: HTTP_CONFLICT ) ; }
Update the specified resource in storage.
Update the specified resource in storage .