Closed nicktan147 closed 10 months ago
That would fill the DB with unnecessary data. 👎
That would fill the DB with unnecessary data. 👎
I'm well aware of this, the reason is we need it to do a checksum against the old and the new values.
https://github.com/owen-it/laravel-auditing/blob/1a9cc9a442a048f3e41c2a424dc883b6df05103e/src/Auditable.php#L199-L215
You could override getUpdatedEventAttributes
, It should go through all the attributes, instead of just the dirty ones
foreach ($this->attributes as $attribute => $value) {
if ($this->isAttributeAuditable($attribute)) {
$old[$attribute] = Arr::get($this->original, $attribute);
$new[$attribute] = $value;
}
}
I would like to make it record all the fields regardless whether is it modified or not. However now it is only tracking fields that are modified only.
There are fields like name, country so forth, however due to its current functionality to keep track only what is changed, is there any option or configuration I can change to make it need not to track only fields that are being modified?