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 975651f commit cf4b36cCopy full SHA for cf4b36c
src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php
@@ -242,7 +242,8 @@ public function setRelatedModel(?Model $related = null)
242
*/
243
public function hasTimestampAttributes($attributes = null)
244
{
245
- return array_key_exists($this->getCreatedAtColumn(), $attributes ?? $this->attributes);
+ return ($createdAt = $this->getCreatedAtColumn()) !== null
246
+ && array_key_exists($createdAt, $attributes ?? $this->attributes);
247
}
248
249
/**
0 commit comments