entity/traits/Properties.php
public function isDirty($properties = null)
    {
        $dirty = $this->getDirty();

        // If no specific attributes were provided, we will just see if the dirty array
        // already contains any attributes. If it does we will just return that this
        // count is greater than zero. Else, we need to check specific attributes.
        if (is_null($properties)) {
            return count($dirty) > 0;
        }

        $properties = is_array($properties)
            ? $properties : func_get_args();

        // Here we will spin through every attribute and see if this is in the array of
        // dirty attributes. If it is, we will return true and if we make it through
        // all of the attributes for the entire array we will return false at end.
        foreach ($properties as $property) {
            if (array_key_exists($property, $dirty)) {
                return true;
            }
        }

        return false;
    }
public function isDirty($properties = null)
    {
        $dirty = $this->getDirty();

        // If no specific attributes were provided, we will just see if the dirty array
        // already contains any attributes. If it does we will just return that this
        // count is greater than zero. Else, we need to check specific attributes.
        if (is_null($properties)) {
            return count($dirty) > 0;
        }

        $properties = is_array($properties)
            ? $properties : func_get_args();

        // Here we will spin through every attribute and see if this is in the array of
        // dirty attributes. If it is, we will return true and if we make it through
        // all of the attributes for the entire array we will return false at end.
        foreach ($properties as $property) {
            if (array_key_exists($property, $dirty)) {
                return true;
            }
        }

        return false;
    }
Determine if the entity or given property(s) have been modified.

@param  array|string|null $properties
@return bool