-
Notifications
You must be signed in to change notification settings - Fork 109
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
Moprh + include = method not found #558
Comments
Found way #1:
But not convenient for all cases. Maybe someone know's better way |
Yeah, polymorphic relationships present a number of problems that I don't think I've ever fully cracked. Think they need some work in future versions of this package to get them working better. Sorry not to be able to provide an immediate fix. |
I have similar case in my project. I solved this by defining dummy relations in model to omit error:
and then, in model:
now you can include through morph relationship :) I am curious about a more elegant solution. |
Closing this in favour of polymorphic relations in the new package - laravel-json-api/laravel |
Hi.
Is there any easy way to include resources after polymorp(MorphTo) relationship ?
Problem: after polymorph relationship different resources have different relationships and you will get fatal with 'method/relationship not found'.
I can make eager loading for such resources via
But can't say the same for includes.
Maybe there is the way to show them even without them in $_GET path ?
The text was updated successfully, but these errors were encountered: