src/Auditable.php
protected function resolveAuditExclusions()
    {
        $this->excludedAttributes = $this->getAuditExclude();

        // When in strict mode, hidden and non visible attributes are excluded
        if ($this->getAuditStrict()) {
            // Hidden attributes
            $this->excludedAttributes = array_merge($this->excludedAttributes, $this->hidden);

            // Non visible attributes
            if ($this->visible) {
                $invisible = array_diff(array_keys($this->attributes), $this->visible);

                $this->excludedAttributes = array_merge($this->excludedAttributes, $invisible);
            }
        }

        // Exclude Timestamps
        if (!$this->getAuditTimestamps()) {
            array_push($this->excludedAttributes, $this->getCreatedAtColumn(), $this->getUpdatedAtColumn());

            if (in_array(SoftDeletes::class, class_uses_recursive(get_class($this)))) {
                $this->excludedAttributes[] = $this->getDeletedAtColumn();
            }
        }

        // Valid attributes are all those that made it out of the exclusion array
        $attributes = Arr::except($this->attributes, $this->excludedAttributes);

        foreach ($attributes as $attribute => $value) {
            // Apart from null, non scalar values will be excluded
            if (is_array($value) || (is_object($value) && !method_exists($value, '__toString'))) {
                $this->excludedAttributes[] = $attribute;
            }
        }
    }
protected function resolveAuditExclusions()
    {
        $this->excludedAttributes = $this->getAuditExclude();

        // When in strict mode, hidden and non visible attributes are excluded
        if ($this->getAuditStrict()) {
            // Hidden attributes
            $this->excludedAttributes = array_merge($this->excludedAttributes, $this->hidden);

            // Non visible attributes
            if ($this->visible) {
                $invisible = array_diff(array_keys($this->attributes), $this->visible);

                $this->excludedAttributes = array_merge($this->excludedAttributes, $invisible);
            }
        }

        // Exclude Timestamps
        if (!$this->getAuditTimestamps()) {
            array_push($this->excludedAttributes, $this->getCreatedAtColumn(), $this->getUpdatedAtColumn());

            if (in_array(SoftDeletes::class, class_uses_recursive(get_class($this)))) {
                $this->excludedAttributes[] = $this->getDeletedAtColumn();
            }
        }

        // Valid attributes are all those that made it out of the exclusion array
        $attributes = Arr::except($this->attributes, $this->excludedAttributes);

        foreach ($attributes as $attribute => $value) {
            // Apart from null, non scalar values will be excluded
            if (is_array($value) || (is_object($value) && !method_exists($value, '__toString'))) {
                $this->excludedAttributes[] = $attribute;
            }
        }
    }
protected function resolveAuditExclusions ( ) { $ this -> excludedAttributes = $ this -> getAuditExclude ( ) ; // When in strict mode, hidden and non visible attributes are excluded if ( $ this -> getAuditStrict ( ) ) { // Hidden attributes $ this -> excludedAttributes = array_merge ( $ this -> excludedAttributes , $ this -> hidden ) ; // Non visible attributes if ( $ this -> visible ) { $ invisible = array_diff ( array_keys ( $ this -> attributes ) , $ this -> visible ) ; $ this -> excludedAttributes = array_merge ( $ this -> excludedAttributes , $ invisible ) ; } } // Exclude Timestamps if ( ! $ this -> getAuditTimestamps ( ) ) { array_push ( $ this -> excludedAttributes , $ this -> getCreatedAtColumn ( ) , $ this -> getUpdatedAtColumn ( ) ) ; if ( in_array ( SoftDeletes :: class , class_uses_recursive ( get_class ( $ this ) ) ) ) { $ this -> excludedAttributes [ ] = $ this -> getDeletedAtColumn ( ) ; } } // Valid attributes are all those that made it out of the exclusion array $ attributes = Arr :: except ( $ this -> attributes , $ this -> excludedAttributes ) ; foreach ( $ attributes as $ attribute => $ value ) { // Apart from null, non scalar values will be excluded if ( is_array ( $ value ) || ( is_object ( $ value ) && ! method_exists ( $ value , '__toString' ) ) ) { $ this -> excludedAttributes [ ] = $ attribute ; } } }
Resolve the Auditable attributes to exclude from the Audit.

@return void
Resolve the Auditable attributes to exclude from the Audit .