fix: change music duration to int
This commit is contained in:
@@ -22,7 +22,7 @@ class Music extends Model
|
||||
'playlist_id', 'image_id', 'duration', 'order', 'is_active'
|
||||
];
|
||||
protected $casts = [
|
||||
'duration' => 'string',
|
||||
'duration' => 'integer',
|
||||
'order' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
@@ -43,10 +43,10 @@ public function tags(): BelongsToMany
|
||||
return $this->belongsToMany(Tag::class, 'music_tags');
|
||||
}
|
||||
|
||||
protected $appends = ['url', 'image_url' , 'average_rating', 'user_rating', 'comments_count' , 'has_user_commented', // Add this
|
||||
'user_comment', // Add this
|
||||
'user_comment_id', // Add this
|
||||
'has_user_rated' // Add this];
|
||||
protected $appends = ['url', 'image_url' , 'average_rating', 'user_rating', 'comments_count' , 'has_user_commented',
|
||||
'user_comment',
|
||||
'user_comment_id',
|
||||
'has_user_rated'
|
||||
];
|
||||
|
||||
public function getUrlAttribute()
|
||||
|
||||
Reference in New Issue
Block a user