You don't want to use with for your use case.
with is being used to solve the N+1 query issue; where you can eager load your data. with does NOT make a join that you can multi-sort on.
What you want, is a join operator so you can orderBy multiple attributes from that result.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.