Open MrAlpha786 opened 1 month ago
Hey @MrAlpha786, I'm happy to look into a better way to handle include aliases. A separate AllowedInclude
method is probably the way to go at first. If the new approach works out better than the current relationship
method, I'm also happy to swap both of them in a new major version. Just to be more consistent with the way people expect this feature to work. Interested to hear your thoughts!
I have a solution for this, what if we create a separate
AllowedInclude::alias($name, $internalName)
, that will directly zip the two arguments. Instead of building separate path for every nested relation.If this is okay with you, I can implement this :)
Originally posted by @MrAlpha786 in https://github.com/spatie/laravel-query-builder/issues/934#issuecomment-2360234186