title: how to sort in Laravel with relationship
body: <p>I want to sort this data by category name. this is my sample table</p>
  <p><a href="https://i.stack.imgur.com/tiSfh.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>this is sample data <a href="https://i.stack.imgur.com/Jr3rh.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>this is the output and my expected output
  <a href="https://i.stack.imgur.com/ImrFy.png" rel="nofollow noreferrer">enter image description here</a></p>