title: How to sync multiple values of the same Attribute in Laravel?
body: <p>I developing an eCommerce ( with Multiple Product Attributes feature ) website using Laravel 5.4. Everything is working fine. But When I try to sync multiple values of the same Attribute in Pivot table. Laravel ignores the duplicate pares. For example, I've an Attribute called "Network" which has 3 values: 2G, 3G, 4G. A mobile supports 3G and 4G network. I want to sync 3G and 4G value in database. Laravel ignores one of them.</p>
  
  <pre><code>Products Table: 
  
  ID - Product Name
  1  - Test Mobile
  
  
  
  Attributes Table
  
  ID - AttributeName
  1 - Network
  
  
  
  AttributeValues Table
  
  ID - AttributeID - AttributeValue
  1  - 1           - 2G
  2  - 1           - 3G
  3  - 1           - 4G
  
  
  
  ProductAttributes Table
  
  ID - AttributeID - ProductID - AttributeValue
  1  - 1           - 1         - 3G
  1  - 1           - 1         - 4G
  </code></pre>
  
  <p>I want to store the Product Attributes in "ProductAttributes" table something like that. But Laravel Ignore one of them.</p>
  
  <p>I am saving the data like that:</p>
  
  <pre><code>    $product = Product::create([
          'name' =&gt; 'Test Mobile'
      ]);
  
      $product-&gt;attributes()-&gt;sync([
          1 =&gt; ['AttributeValue' =&gt; '3G'], 
          1 =&gt; ['AttributeValue' =&gt; '4G']
      ]);
  </code></pre>
  
  <p>Any suggestions, Ideas?</p>