code: public function update(Model $model, array $newAttributes)
      {
          $results = $model->update($newAttributes);
  
          if(!$results){
              throw new UpdateFailedRepositoryException();
          }
  
          return $model;
      }
docs: Update a model given a model and an array of new attributes
  
  @param Model $model
  @param array $newAttributes
  @return mixed
  @throws UpdateFailedRepositoryException