Usage of Auditing for Deleted Models #857
Unanswered
nilskretschmer
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Not, it don't
No
The ideal is to use it, so you can use |
Beta Was this translation helpful? Give feedback.
1 reply
-
@parallels999 How could I get all audits for my (lets stay in the example) |
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
-
Hi,
I am currently looking into this library for an ongoing project. After looking into the docs I am not 100% sure if it fits the project's needs.
Example:
I have some "Job" Model. This Job Model is associated with a user. If the user gets deleted, the job gets deleted (onDeleteCascade). How do I get audits from a deleted model? Are audits lost if a model is deleted? Do I need to use softDelete on all models I want to have audits for?
Because the Relationship between the auditable morph table and the deleted model is lost I think the only way would be to query the audit table itself. But I am not sure if the Audits itself are also cascade-deleted if their related model was deleted.
Can someone help me out?
Beta Was this translation helpful? Give feedback.
All reactions