Support the ongoing development of Laravel.io →
posted 6 years ago
Last updated 1 year ago.
0

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.

Last updated 6 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Yomi Ojo Yomi Ojo yormie Joined 24 Jun 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.