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
Apologies in advance. I'm not sure if this should be considered a bug, or a feature request to use that Laravel feature.
When using Laravel's newer Model::shouldBeStrict(), pages fail to load as Laravel is throwing exceptions.
More specifically it appears to be Model::preventAccessingMissingAttributes() that is throwing a fit.
The error thrown is
The attribute [pivot] either does not exist or was not retrieved for model [<Model FQN>].
The Model in question (User), in the provided repo, has no relationships.
Attached video and screenshot of the issue
ScreenShot.2022-10-14.at.22.27.26.mp4
Detailed steps to reproduce the issue on a fresh Nova installation:
Check out the repo provided, using the branch issue/laravel-model-strictness
Install dependencies, and publish assets
Create a user
Log in to Nova
View any page (like the users resource)
The text was updated successfully, but these errors were encountered:
After various tests/changes to Nova, it seems impossible to support Model::preventAccessingMissingAttributes() without introducing breaking changes. As a result, I have submitted laravel/framework#44627 where you should be able to disable strict mode when accessed in Nova.
I had a hunch that was the case. In the meantime I've enabled all 3 separately, with Model::preventAccessingMissingAttributes() checking for the Nova routes as well. 👍
Description:
Apologies in advance. I'm not sure if this should be considered a bug, or a feature request to use that Laravel feature.
When using Laravel's newer
Model::shouldBeStrict()
, pages fail to load as Laravel is throwing exceptions.More specifically it appears to be
Model::preventAccessingMissingAttributes()
that is throwing a fit.The error thrown is
The Model in question (User), in the provided repo, has no relationships.
Attached video and screenshot of the issue
ScreenShot.2022-10-14.at.22.27.26.mp4
Detailed steps to reproduce the issue on a fresh Nova installation:
issue/laravel-model-strictness
The text was updated successfully, but these errors were encountered: