You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having Model::preventAccessingMissingAttributes(true); and trying to make use of a JsonResource whenPivotLoadedAs() method results in a Illuminate\Database\Eloquent\MissingAttributeException. Is this an expected behaviour? Shouldn't the whenPivotLoadedAs method check for the relation existence by calling relationLoaded instead of trying to access the relationship directly?
I could do a PR with that change.
The text was updated successfully, but these errors were encountered:
Description:
Having
Model::preventAccessingMissingAttributes(true);
and trying to make use of a JsonResourcewhenPivotLoadedAs()
method results in aIlluminate\Database\Eloquent\MissingAttributeException
. Is this an expected behaviour? Shouldn't thewhenPivotLoadedAs
method check for the relation existence by callingrelationLoaded
instead of trying to access the relationship directly?I could do a PR with that change.
The text was updated successfully, but these errors were encountered: