title: OrderBy Sum in Laravel
body: <p>How would I go about ordering a sum in Laravel</p>
  
  <p>Currently, using</p>
  
  <p><code>Auth::user()-&gt;activities()-&gt;groupBy('attempts_id')-&gt;sum('points');</code></p>
  
  <p>Will only give me the first row. I need to order by that sum in descending order and grab the first item.</p>
  
  <p>Using <code>-&gt;get()</code> at the end results in an error:
  <code>Call to a member function get() on a non-object</code></p>