The array has strings in it, not datetime objects.

This commit is contained in:
Peter Deltchev 2016-01-04 09:12:21 -08:00
parent df5a911168
commit a2b450baa6

View file

@ -64,7 +64,7 @@ class TrackFile extends Model
'status' => 'integer', 'status' => 'integer',
'filesize' => 'integer', 'filesize' => 'integer',
]; ];
public function track() { public function track() {
return $this->belongsTo(Track::class)->withTrashed(); return $this->belongsTo(Track::class)->withTrashed();
} }
@ -106,8 +106,8 @@ class TrackFile extends Model
} }
public function getIsExpiredAttribute() { public function getIsExpiredAttribute() {
return $this->attributes['expires_at'] === null || return $this->expires_at === null ||
$this->attributes['expires_at']->isPast(); $this->expires_at->isPast();
} }
public function getFormatAttribute($value) public function getFormatAttribute($value)