title: Use Laravel Collection to get duplicate values
body: <p>I don´t want to remove the duplicate values, I want to get the articles_id duplicates and sum their quantity values, for example, this is my collection:</p>
  
  <pre><code>Collection {#306 ▼
    #items: array:3 [▼
      0 =&gt; CartLine {#294 ▼
        +quantity: 2
        +article_id: 1728
        +article_name: "TAZA CERAMICA"
      }
      1 =&gt; CartLine {#296 ▼
        +parent_line_id: null
        +quantity: 1
        +article_id: 1728
        +article_name: "TAZA CERAMICA"
      }
      2 =&gt; CartLine {#298 ▼
        +quantity: 1
        +article_id: 1378
        +article_name: "JARRA CERVEZA ALEMANA"
  
      }
    ]
  }
  </code></pre>
  
  <p>And I want get this result:</p>
  
  <pre><code>Collection {#306 ▼
    #items: array:3 [▼
      0 =&gt; CartLine {#294 ▼
        +quantity: 3 //sum total quantity of the duplicates elements with same article_id
        +article_id: 1728
        +article_name: "TAZA CERAMICA"
      }
      1 =&gt; CartLine {#296 ▼
        +parent_line_id: null
        +quantity: 3
        +article_id: 1728
        +article_name: "TAZA CERAMICA"
      }
      2 =&gt; CartLine {#298 ▼
        +quantity: 1
        +article_id: 1378
        +article_name: "JARRA CERVEZA ALEMANA"
  
      }
    ]
  }
  </code></pre>
  
  <p>I want sum the quantities of the duplicate elements and set the quantity property with the sum in these elements.</p>