private function changedAuditingFields()
{
$changesToTecord = [];
foreach ($this->dirtyData as $attribute => $value) {
if ($this->isAttributeAuditable($attribute) && !is_array($value)) {
// Check whether the current value is difetente the original value
if (!isset($this->originalData[$attribute]) || $this->originalData[$attribute] != $this->updatedData[$attribute]) {
$changesToTecord[$attribute] = $value;
}
} else {
unset($this->updatedData[$attribute]);
unset($this->originalData[$attribute]);
}
}
return $changesToTecord;
}