protected function getDirtyAttributes(array $actual, array $cached): array
    {
        $dirty = [];

        foreach ($actual as $key => $value) {
            if (!$this->originalIsNumericallyEquivalent($value, $cached[$key])) {
                $dirty[$key] = $actual[$key];
            }
        }

        return $dirty;
    }
protected function getDirtyAttributes(array $actual, array $cached): array
    {
        $dirty = [];

        foreach ($actual as $key => $value) {
            if (!$this->originalIsNumericallyEquivalent($value, $cached[$key])) {
                $dirty[$key] = $actual[$key];
            }
        }

        return $dirty;
    }
protected function getDirtyAttributes ( array $ actual , array $ cached ) : array { $ dirty = [ ] ; foreach ( $ actual as $ key => $ value ) { if ( ! $ this -> originalIsNumericallyEquivalent ( $ value , $ cached [ $ key ] ) ) { $ dirty [ $ key ] = $ actual [ $ key ] ; } } return $ dirty ; }
Compare two attributes array and return dirty attributes.

@param array $actual
@param array $cached

@return array
Compare two attributes array and return dirty attributes .