[v5]how to orderBy preload column ? #4100
-
there is User , Document Model I want it to work with
i know if use join
Lazy Loading method load() need findOrFail || find function so i can`t use it Is there any way without using join or orderByRaw? or how can use lazy loding way? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello |
Beta Was this translation helpful? Give feedback.
-
Hey @BlazingCode! 👋🏻 I recommend writing the query in SQL first without relying on the ORM. |
Beta Was this translation helpful? Give feedback.
Hey @BlazingCode! 👋🏻
I recommend writing the query in SQL first without relying on the ORM.
Once you have a query that meets your requirements, we can consider how to integrate it into the ORM syntax.