Export fails when query has with relation
This serialize facade used in the exporter errors ungracefully if there are any ->with('relation') on the query. Taken a while to figure out what was happening.
It references this package and there are others with similar problems.
https://github.com/AnourValar/eloquent-serialize/issues?q=relation
https://github.com/AnourValar/eloquent-serialize/issues?q=relation
GitHub
Issues · AnourValar/eloquent-serialize
Contribute to AnourValar/eloquent-serialize development by creating an account on GitHub.
1 Reply
In case anyone else has the problem, a workaround is to remove eager loaded relations on the exporter like this:-