title: Merge duplicate laravel objects
body: <p>I am working on a leaderboard and each user has many records on the leaderboards table. Here's the object it returns</p>
  
  <pre><code>[
    {
      "user_id": 3,
      "user_name": "Langosh Troy",
      "points": 78
    },
    {
      "user_id": 3,
      "user_name": "Langosh Troy",
      "points": 76
    },
    {
      "user_id": 1,
      "user_name": "Crooks Elsa",
      "points": 12
    }
  ]
  </code></pre>
  
  <p>But I want it to appear such that the object with <strong>user_id = 3</strong> would become one object so my final return value should look this way</p>
  
  <pre><code>[
    {
      "user_id": 3,
      "user_name": "Langosh Troy",
      "points": 154
    },
    {
      "user_id": 1,
      "user_name": "Crooks Elsa",
      "points": 12
    }
  ]
  </code></pre>