Skip to content

Commit b33b674

Browse files
Fix ignoring dateFormat model property
1 parent 03aa707 commit b33b674

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Eloquent/DocumentModel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ public function getDateFormat()
148148
/** @inheritdoc */
149149
public function freshTimestamp()
150150
{
151+
if (isset($this->dateFormat)) {
152+
return Date::now();
153+
}
151154
return new UTCDateTime(Date::now());
152155
}
153156

0 commit comments

Comments
 (0)