title: orderby doesn't work in Laravel Eloquent advanced query
body: <p>I'd like to sort my data by using orderby in Laravel Eloquent advanced query. Here is my code:</p>
  
  <pre><code>  $users = User::where(function($query){
  
         $query-&gt;orderBy('created_at', 'DESC');
  
    })-&gt;get()-&gt;toArray();
    var_dump($users);
  </code></pre>
  
  <p>But it doesn't work. Instead if I use orderby like this:</p>
  
  <pre><code>  $users = User::orderBy('created_at', 'DESC')-&gt;get()-&gt;toArray();
    var_dump($users);
  </code></pre>
  
  <p>It works.</p>
  
  <p>Can anybody suggest how to make the orderby works for the advanced query? Thanks</p>