@extends('layouts.landing-page') @section('styles') @endsection @section('content') @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('songs.image', ['filename' => $filename]) : 'https://via.placeholder.com/500/500?random=' . $song->id; @endphp
{{ number_format(rand(1000000, 50000000)) }} monthly listeners
{{ $song->artist->bio ?? 'No artist biography available.' }}
{{ $song->album->artist->name ?? '' }}
Released: {{ '' }} • {{ rand(8, 15) }} songs