title: sortBy of collection and orderBy of Eloquent, which one is faster in Laravel
body: <p>I have a <code>users</code> table and I have associated <code>User</code> model for it. Now to get all the user from that table ordered by <code>updated_at</code> I can follow two following ways:</p>
  
  <p><strong>1. Using Eloquent(DB): let's say MySQL</strong></p>
  
  <p><code>User::orderBy('updated_at')-&gt;get();</code></p>
  
  <p><strong>2. Using collection method(PHP)</strong></p>
  
  <p><code>User::get()-&gt;sortBy('updated_at');</code></p>
  
  <p>Between this tow ways, which one is better/faster? and why?</p>