Combining with laravel-query-builder #443
Unanswered
AndreasHerss
asked this question in
Q&A
Replies: 1 comment
-
Could you provide some more info about the structure of your DTO? and the way you setup the laravel-query-builder... As for now as the includes can be optional i also think the DTO parameters in your constructor should be optional with an Just a thought... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, i'm trying to combine laravel-data and laravel-query-builder in the same requests, but have an issue, maybe it's just me staring at it too long 🤷♂️
I'm using laravel-query-builder to allow sort and filters, and the send the data to my DTO made with laravel-data.
The problem occurs when adding an ?include=user,date
The date is just a Lazy field, and the user is a Lazy relation
if not adding the user allowedIncludes to the query, it gives an N+1 issue (as the data is served from the query-builder)
if adding the user i get an error that the date is not allowed. as i'm trying to include the date field too..
Any help would be appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions