Skip to content

Commit 0d7ac95

Browse files
authored
Remove deprecated dates property (#42587)
1 parent feb4e60 commit 0d7ac95

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,6 @@ trait HasAttributes
105105
'timestamp',
106106
];
107107

108-
/**
109-
* The attributes that should be mutated to dates.
110-
*
111-
* @deprecated Use the "casts" property
112-
*
113-
* @var array
114-
*/
115-
protected $dates = [];
116-
117108
/**
118109
* The storage format of the model's date columns.
119110
*
@@ -1366,16 +1357,10 @@ protected function serializeDate(DateTimeInterface $date)
13661357
*/
13671358
public function getDates()
13681359
{
1369-
if (! $this->usesTimestamps()) {
1370-
return $this->dates;
1371-
}
1372-
1373-
$defaults = [
1360+
return $this->usesTimestamps() ? [
13741361
$this->getCreatedAtColumn(),
13751362
$this->getUpdatedAtColumn(),
1376-
];
1377-
1378-
return array_unique(array_merge($this->dates, $defaults));
1363+
] : [];
13791364
}
13801365

13811366
/**

0 commit comments

Comments
 (0)