Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 29, 2019
1 parent a71d176 commit eef682f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Eloquent/Concerns/HasTimestamps.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ protected function updateTimestamps()
$time = $this->freshTimestamp();

$updatedAtColumn = $this->getUpdatedAtColumn();

if (! is_null($updatedAtColumn) && ! $this->isDirty($updatedAtColumn)) {
$this->setUpdatedAt($time);
}

$createdAtColumn = $this->getCreatedAtColumn();

if (! $this->exists && ! is_null($createdAtColumn) && ! $this->isDirty($createdAtColumn)) {
$this->setCreatedAt($time);
}
Expand Down

0 comments on commit eef682f

Please sign in to comment.