original_string: public function update(array $attributes, $idOrModel, array $options = [])
      {
      	$product = $this->modelOrFind($idOrModel);
      	$attributes = Collection::make($attributes);
  
      	$attr = $attributes->except('features', 'pictures', 'default_picture')->merge([
              'features' => \Antvel\Features\Parser::toJson($attributes->get('features')),
              'category_id' => $attributes->get('category'),
              'price' => $attributes->get('price') * 100,
              'cost' => $attributes->get('cost') * 100,
              'status' => $attributes->get('status'),
              'updated_by' => auth()->user()->id,
              'tags' => $attributes->get('name'),
          ])->all();
  
      	$this->updatePicturesFor($product, $attributes);
  
      	return $product->update($attr);
      }
code: public function update(array $attributes, $idOrModel, array $options = [])
      {
      	$product = $this->modelOrFind($idOrModel);
      	$attributes = Collection::make($attributes);
  
      	$attr = $attributes->except('features', 'pictures', 'default_picture')->merge([
              'features' => \Antvel\Features\Parser::toJson($attributes->get('features')),
              'category_id' => $attributes->get('category'),
              'price' => $attributes->get('price') * 100,
              'cost' => $attributes->get('cost') * 100,
              'status' => $attributes->get('status'),
              'updated_by' => auth()->user()->id,
              'tags' => $attributes->get('name'),
          ])->all();
  
      	$this->updatePicturesFor($product, $attributes);
  
      	return $product->update($attr);
      }
code_tokens: public function update ( array $ attributes , $ idOrModel , array $ options = [ ] ) { $ product = $ this -> modelOrFind ( $ idOrModel ) ; $ attributes = Collection :: make ( $ attributes ) ; $ attr = $ attributes -> except ( 'features' , 'pictures' , 'default_picture' ) -> merge ( [ 'features' => \ Antvel \ Features \ Parser :: toJson ( $ attributes -> get ( 'features' ) ) , 'category_id' => $ attributes -> get ( 'category' ) , 'price' => $ attributes -> get ( 'price' ) * 100 , 'cost' => $ attributes -> get ( 'cost' ) * 100 , 'status' => $ attributes -> get ( 'status' ) , 'updated_by' => auth ( ) -> user ( ) -> id , 'tags' => $ attributes -> get ( 'name' ) , ] ) -> all ( ) ; $ this -> updatePicturesFor ( $ product , $ attributes ) ; return $ product -> update ( $ attr ) ; }
docstring: Update a Model in the database.
  
  @param array $attributes
  @param Product|mixed $idOrModel
  @param array $options
  
  @return bool
docstring_tokens: Update a Model in the database .