Skip to content

Commit

Permalink
Use pivot model fromDateTime instead of assuming Carbon (#46822)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudiedirkx authored Apr 18, 2023
1 parent 6f575fc commit ed75852
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ protected function addTimestampsToAttachment(array $record, $exists = false)
if ($this->using) {
$pivotModel = new $this->using;

$fresh = $fresh->format($pivotModel->getDateFormat());
$fresh = $pivotModel->fromDateTime($fresh);
}

if (! $exists && $this->hasPivotColumn($this->createdAt())) {
Expand Down

0 comments on commit ed75852

Please sign in to comment.