@php
// Extract filename from the 3rd image variant (small)
$coverImages = explode(',', $song->cover_image ?? '');
$smallCoverFile = $coverImages[2] ?? null;
// Get just the filename from the path (e.g. "cover_abc_sm.jpeg")
$filename = $smallCoverFile ? basename($smallCoverFile) : null;
// Generate image URL via route
$imageUrl = $filename
? route('admin.songs.image', ['filename' => $filename])
: 'https://via.placeholder.com/40';
@endphp

{{--
--}}
@error('cover_image')
@enderror