diff --git a/app/Models/Album.php b/app/Models/Album.php index aa083367..ef807da5 100644 --- a/app/Models/Album.php +++ b/app/Models/Album.php @@ -93,7 +93,7 @@ class Album extends Model implements Searchable, Commentable, Favouritable protected $elasticsearchType = 'album'; - protected $dates = ['deleted_at']; + protected $fillable = ['user_id', 'title', 'slug']; public static function summary() diff --git a/app/Models/Comment.php b/app/Models/Comment.php index 0a1706ea..abdffd86 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -72,7 +72,7 @@ class Comment extends Model protected $table = 'comments'; - protected $dates = ['deleted_at']; + public function user() { diff --git a/app/Models/Playlist.php b/app/Models/Playlist.php index cdee9ef4..fc552cb1 100644 --- a/app/Models/Playlist.php +++ b/app/Models/Playlist.php @@ -95,7 +95,7 @@ class Playlist extends Model implements Searchable, Commentable, Favouritable protected $elasticsearchType = 'playlist'; protected $table = 'playlists'; - protected $dates = ['deleted_at']; + protected $casts = [ 'id' => 'integer', 'user_id' => 'integer', diff --git a/app/Models/Track.php b/app/Models/Track.php index 5fe14b57..70f5e124 100644 --- a/app/Models/Track.php +++ b/app/Models/Track.php @@ -152,7 +152,9 @@ class Track extends Model implements Searchable, Commentable, Favouritable protected $elasticsearchType = 'track'; - protected $dates = ['deleted_at', 'published_at', 'released_at']; + protected $dates = [ + 'published_at', 'released_at' + ]; protected $hidden = ['original_tags', 'metadata']; protected $casts = [ 'id' => 'integer',