Is your feature proposal related to a problem? Please describe.
It seems that it is currently not possible to eager-load multiple relationships through the @with directive.
Describe the solution you'd like
I think it should either be possible to use the @with directive more than once on a single field, or the @with directive should accept an array of relationships.
- Using the
@with directive multiple times: I'm not sure if it's currently possible to use any directive more than once on a single field. Is this being prevented for some reason?
- Accepting an array of relations through the
@with directive: The question is how to handle scopes then, should they be part of the relations array (e.g relations: ["relation" => ["scopeOne", "scopeTwo"]]?
Describe alternatives you've considered
I haven't found any alternative to overcome this issue.
Is your feature proposal related to a problem? Please describe.
It seems that it is currently not possible to eager-load multiple relationships through the
@withdirective.Describe the solution you'd like
I think it should either be possible to use the
@withdirective more than once on a single field, or the@withdirective should accept an array of relationships.@withdirective multiple times: I'm not sure if it's currently possible to use any directive more than once on a single field. Is this being prevented for some reason?@withdirective: The question is how to handle scopes then, should they be part of therelationsarray (e.grelations: ["relation" => ["scopeOne", "scopeTwo"]]?Describe alternatives you've considered
I haven't found any alternative to overcome this issue.