Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better nested include param analyze? #386

Open
HuNanZai opened this issue May 12, 2017 · 1 comment
Open

Better nested include param analyze? #386

HuNanZai opened this issue May 12, 2017 · 1 comment
Labels

Comments

@HuNanZai
Copy link

when using fractal(0.13.0) in Laravel(5.1.45)

include=resourceA:fields(a|b|c).resourceB:fields(aa|bb|cc) won't work
so i have to write like this:
include=resourceA:fields(a|b|c),resourceA.resourceB:fields(aa|bb|cc)
it'll become a quite long query string when things getting just a little more complicated!

i wonder the reason why not support analyze the nested relations and params at the same time?
the include=resourceA:fields(a|b|c).resourceB:fields(aa|bb|cc) way.

the reason locates in the Manager.php's function parseIncludes, after explode(',', ....) the code start to load the param by : so the nested param is loaded and the nested info is abandoned.
so just adjust the order of the code here, after explode(',', ...) then explode('.', ...) and store the nested relation then load the param.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 4 weeks if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant