-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Model::preventAccessingMissingAttributes() raises exception when extending a model #49656
Comments
Correct. You should define this on your extending model as well. |
Even after defining
|
Heya, thanks for reporting. We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here? Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up. laravel new bug-report --github="--public" Please do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue. Thanks! |
I faced the same issue in the past and found that one of the queries has ->select() without that particular value so please check them again... |
Feel free to open a new issue once you have a repo which reproduces this. |
Laravel Version
10.40.0
PHP Version
8.2.13
Database Driver & Version
MySQL 8
Description
I've recently upgraded to this version of Laravel. I'm using:
I have a model:
App\Models\Reports\Daily\AffiliateDailySummaryStat
when extends a template model calledApp\Models\Reports\AffiliateSummaryStatTemplate
. I'm getting the following error:Now,
total_redirected
is indeed a column within my database, but I think Laravel is expecting the$casts
to be on theAffiliateDailySummaryStat
model which isn't great.Steps To Reproduce
My casts of my template model:
And the main model throwing the error:
Does
preventAccessingMissingAttributes
complain aboutThe text was updated successfully, but these errors were encountered: