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

[9.x] Fix whenPivotLoaded(As) api resource methods when using Eloquent strict mode #44792

Conversation

gdebrauwer
Copy link
Contributor

When the "Prevent accessing missing attributes on retrieved models" feature of Eloquent strict mode is enabled, the code $this->resource->$accessor will cause an unwanted exception. Using isset method fixes this.

@taylorotwell taylorotwell merged commit 4f7ee1d into laravel:9.x Oct 31, 2022
@taylorotwell
Copy link
Member

So tired of strict mode 😢

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.

2 participants