public function attributeValuesToBeLogged(string $processingEvent) : array
{
if (!count($this->attributesToBeLogged())) {
return [];
}
$properties['attributes'] = static::logChanges($this);
if (static::eventsToBeRecorded()->contains('updated') && $processingEvent == 'updated') {
$nullProperties = array_fill_keys(array_keys($properties['attributes']), null);
$properties['old'] = array_merge($nullProperties, $this->oldAttributes);
}
return $properties;
}