original_string: public function groupWith(...$products)
      {
          $products = Collection::make($products)->flatten()->all();
  
          foreach ($products as $product) {
              if (! $this->hasGroup($product)) {
                  $this->group()->attach($product);
              }
          }
      }
code: public function groupWith(...$products)
      {
          $products = Collection::make($products)->flatten()->all();
  
          foreach ($products as $product) {
              if (! $this->hasGroup($product)) {
                  $this->group()->attach($product);
              }
          }
      }
code_tokens: public function groupWith ( ... $ products ) { $ products = Collection :: make ( $ products ) -> flatten ( ) -> all ( ) ; foreach ( $ products as $ product ) { if ( ! $ this -> hasGroup ( $ product ) ) { $ this -> group ( ) -> attach ( $ product ) ; } } }
docstring: Add products to a given group.
  
  @param  array $products
  
  @return void
docstring_tokens: Add products to a given group .