Usage of Auditing for Deleted Models #857
-
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: 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.
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.
-
@parallels999 How could I get all audits for my (lets stay in the example) |
Beta Was this translation helpful? Give feedback.
From db with
Audit
model, use a where formodel_type='App\Models\Jobs'
, still laravel eloquent , you can do whatever you want