feat: add detail image media and play list
This commit is contained in:
@@ -15,7 +15,7 @@ class MusicPlaylist extends Model
|
||||
protected $table = 'music_playlists';
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'slug', 'description', 'image_id', 'order', 'is_active'
|
||||
'name', 'slug', 'description', 'image_id', 'detail_image_id', 'order', 'is_active'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@@ -54,6 +54,12 @@ public function image(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Image::class);
|
||||
}
|
||||
|
||||
// Image shown on the detail (show-by-id) screen; image() is the list thumbnail.
|
||||
public function detailImage(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Image::class, 'detail_image_id');
|
||||
}
|
||||
|
||||
public function getActiveMusicsAttribute()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user