fixed eloquent datetime bug when determining dirty attributes.
This commit is contained in:
parent
8bc128fdaa
commit
1847a369fb
|
@ -472,7 +472,17 @@ public function table()
|
||||||
*/
|
*/
|
||||||
public function get_dirty()
|
public function get_dirty()
|
||||||
{
|
{
|
||||||
return array_diff_assoc($this->attributes, $this->original);
|
$dirty = array();
|
||||||
|
|
||||||
|
foreach ($this->attributes as $key => $value)
|
||||||
|
{
|
||||||
|
if ( ! isset($this->original[$key]) or $value !== $this->original[$key])
|
||||||
|
{
|
||||||
|
$dirty[$key] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $dirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue