original_string: public function update(AddressBookRequest $request, int $id)
      {
          try {
              $address = Auth::user()->findAddress($id);
          } catch(\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
              return $this->respondsWithError(trans('address.errors.model_not_found'));
          }
  
          $address->update($request->all());
  
          return $this->respondsWithSuccess(trans('address.success_update'), route('addressBook.index'));
      }
code: public function update(AddressBookRequest $request, int $id)
      {
          try {
              $address = Auth::user()->findAddress($id);
          } catch(\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
              return $this->respondsWithError(trans('address.errors.model_not_found'));
          }
  
          $address->update($request->all());
  
          return $this->respondsWithSuccess(trans('address.success_update'), route('addressBook.index'));
      }
code_tokens: public function update ( AddressBookRequest $ request , int $ id ) { try { $ address = Auth :: user ( ) -> findAddress ( $ id ) ; } catch ( \ Illuminate \ Database \ Eloquent \ ModelNotFoundException $ e ) { return $ this -> respondsWithError ( trans ( 'address.errors.model_not_found' ) ) ; } $ address -> update ( $ request -> all ( ) ) ; return $ this -> respondsWithSuccess ( trans ( 'address.success_update' ) , route ( 'addressBook.index' ) ) ; }
docstring: Update a given address.
  
  @param  AddressBookFormRequest $request
  @param  int $id
  
  @return void
docstring_tokens: Update a given address .