We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d279a1e commit 248efddCopy full SHA for 248efdd
illuminate/Database/Eloquent/Concerns/HasAttributes.php
@@ -2131,10 +2131,18 @@ public function getDirty()
2131
$this->tmpDirtyIfAttributesAreSyncedFromCashedCasts;
2132
}
2133
2134
- $attributes = [] !== $attributes ? $attributes : \array_keys($this->attributes);
2135
-
2136
$dirty = [];
2137
+ if ([] === $attributes) {
+ foreach ($this->getAttributes() as $key => $value) {
2138
+ if (!$this->originalIsEquivalent($key)) {
2139
+ $dirty[$key] = $value;
2140
+ }
2141
2142
+
2143
+ return $dirty;
2144
2145
2146
foreach ($attributes as $key) {
2147
/** This will call $this->mergeAttributesFromCachedCasts($key) before the if condition */
2148
$value = $this->getAttributeFromArray($key);
0 commit comments