Shift SoftDeletes date cast

This commit is contained in:
Laravel Shift 2021-02-14 18:01:29 +00:00
parent bf34794087
commit dfd55352e4
4 changed files with 6 additions and 4 deletions

View file

@ -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()

View file

@ -72,7 +72,7 @@ class Comment extends Model
protected $table = 'comments';
protected $dates = ['deleted_at'];
public function user()
{

View file

@ -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',

View file

@ -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',