From a2b450baa6a2d4d765941f60da99104bd42db8bc Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Mon, 4 Jan 2016 09:12:21 -0800 Subject: [PATCH] The array has strings in it, not datetime objects. --- app/Models/TrackFile.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/TrackFile.php b/app/Models/TrackFile.php index 265cdc5c..1eac4f80 100644 --- a/app/Models/TrackFile.php +++ b/app/Models/TrackFile.php @@ -64,7 +64,7 @@ class TrackFile extends Model 'status' => 'integer', 'filesize' => 'integer', ]; - + public function track() { return $this->belongsTo(Track::class)->withTrashed(); } @@ -106,8 +106,8 @@ class TrackFile extends Model } public function getIsExpiredAttribute() { - return $this->attributes['expires_at'] === null || - $this->attributes['expires_at']->isPast(); + return $this->expires_at === null || + $this->expires_at->isPast(); } public function getFormatAttribute($value)