src/Database/Models/Traits/Auditable.php
/**
     * Update excluded audit attributes.
     *
     * @return void
     */
Update excluded audit attributes.
@return void
Update excluded audit attributes . @return void
protected function updateAuditExclusions()
    {
        $this->auditableExclusions = $this->getAuditExclude();
        if ($this->getAuditStrict()) {
            $this->auditableExclusions = array_merge($this->auditableExclusions, $this->hidden);
            if (count($this->visible)) {
                $invisible = array_diff(array_keys($this->attributes), $this->visible);
                $this->auditableExclusions = array_merge($this->auditableExclusions, $invisible);
            }
        }
        if (! $this->getAuditTimestamps()) {
            array_push($this->auditableExclusions, static::CREATED_AT, static::UPDATED_AT);
            $this->auditableExclusions[] = defined('static::DELETED_AT') ? static::DELETED_AT : 'deleted_at';
        }
        $attributes = array_except($this->attributes, $this->auditableExclusions);
        foreach ($attributes as $attribute => $value) {
            if (is_object($value) && ! method_exists($value, '__toString') || is_array($value)) {
                $this->auditableExclusions[] = $attribute;
            }
        }
    }
protected function updateAuditExclusions ( ) { $ this -> auditableExclusions = $ this -> getAuditExclude ( ) ; if ( $ this -> getAuditStrict ( ) ) { $ this -> auditableExclusions = array_merge ( $ this -> auditableExclusions , $ this -> hidden ) ; if ( count ( $ this -> visible ) ) { $ invisible = array_diff ( array_keys ( $ this -> attributes ) , $ this -> visible ) ; $ this -> auditableExclusions = array_merge ( $ this -> auditableExclusions , $ invisible ) ; } } if ( ! $ this -> getAuditTimestamps ( ) ) { array_push ( $ this -> auditableExclusions , static :: CREATED_AT , static :: UPDATED_AT ) ; $ this -> auditableExclusions [ ] = defined ( 'static::DELETED_AT' ) ? static :: DELETED_AT : 'deleted_at' ; } $ attributes = array_except ( $ this -> attributes , $ this -> auditableExclusions ) ; foreach ( $ attributes as $ attribute => $ value ) { if ( is_object ( $ value ) && ! method_exists ( $ value , '__toString' ) || is_array ( $ value ) ) { $ this -> auditableExclusions [ ] = $ attribute ; } } }
Update excluded audit attributes.
Update excluded audit attributes .
// When in strict mode, hidden and non visible attributes are excluded // Apart from null, non scalar values will be excluded