Resource hook does not provide original attributes. #5633
Answered
by
crynobone
stefan-pfeifer
asked this question in
Q&A
-
Description:Expectation:When the resource hook Reality:
Workaround:Use a regular Laravel observer instead of Nova hooks. |
Beta Was this translation helpful? Give feedback.
Answered by
crynobone
Jun 26, 2023
Replies: 1 comment
-
|
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
crynobone
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Resource::afterCreate()andResource::afterUpdate()is only fired after$model->save()and at this point original attributes has been synced. You should use Laravel Observer if you have such requirements.