laravel-auditing
laravel-auditing copied to clipboard
Does threshold limit remove over the limit entries?
Q | A |
---|---|
Bug? | maybe |
New Feature? | no |
Framework | Laravel |
Framework version | 5.8 |
Package version | 9.0 |
PHP version | 7.2 |
Actual Behaviour
There are 800 entries of the auditable type. I only want to keep around 100, so I set the
protected $auditThreshold = 10;
When I create a new model and update it, it is saved to audits
table, but the total entries are 801.
Do I have to run some kind of command to prune the entries manually?
Expected Behaviour
The audit threshold should be respected and the total entries should be 10, instead of 801.
Steps to Reproduce
-
Create 20 entries of the same auditable type
-
Set $auditThreshold to 10
-
Create and Update a new auditable type model
-
Check database
Possible Solutions
N/A