title: Laravel sortBy() not working to sort a collection
body: <p>I want to sort a collection by name column. Using sortBy() method is not working.</p>
  
  <pre><code>    $collection = \App\Http\Resources\MyResource::collection($test);
  
      return $collection-&gt;sortBy('name');
  </code></pre>