Spatie\Activitylog\Traits\DetectsChanges::attributeValuesToBeLogged PHP Method

attributeValuesToBeLogged() public method

public attributeValuesToBeLogged ( string $processingEvent ) : array
$processingEvent string
return array
    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;
    }