loadCount method change the model attributes #3441
Unanswered
farshadfahimi
asked this question in
Help
Replies: 1 comment
-
I'm having similar issue. Were you able to fix it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a simple model like below
and in the controller just fetch the one model from database
the result of
console
in the controller is some thing like belowbut when uncomment
await brand.loadCount('products')
from controller the result oconsole
change toas you can see the
$attributes
property data is changed and remove model properties and just save theid
for use in eager loadingand if the controller code change to something like below and use
withCount
problem is solvedBeta Was this translation helpful? Give feedback.
All reactions