Here is my case:
I have a table
users. Each user may have many
delivery_orders and many
Let's make it simple and say the tables are like this:
For each user I want the oldest entry (date) between
invoices and then order all my users based on their relative oldest date.
I can achieve this by retrieving all my users and then do the filtering and ordering but is it somehow possible to do that through an eloquent request? What is the best and cleanest way to achieve this result?