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

[7.x] Fix augmentation on frontend routes #610

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Sep 24, 2024

This pull request fixes an issue where fields weren't being augmented correctly on frontend routes.

This issue was caused by #590, where we started passing the model to ->cascadeContent() instead of passing the augmented array to ->with().

However, this meant that the data on frontend routes wasn't being augmented since Cascade::hydrateContent() checks if the data (the Eloquent Model in this case) implements the Augmentable interface which models aren't implementing.

Since there's no way for us to add the interface in Runway's traits, we're just passing the augmented data along again to ->with() which fixes the issue.

Fixes #606.

@duncanmcclean duncanmcclean merged commit ec6e663 into 7.x Sep 24, 2024
12 checks passed
@duncanmcclean duncanmcclean deleted the fix/augmentation-on-frontend-routes branch September 24, 2024 10:53
Copy link

Released as part of v7.9.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relationship not augmenting
1 participant