@extends('layouts.landing-page') @section('content') @php $bgUrl = app(\App\Services\UserServices::class)->getBgProfile($composer, 'lg'); $avatarUrl = app(\App\Services\UserServices::class)->getAvatar($composer, 'md'); $genres = app(\App\Services\UserServices::class)->getAllGenre($composer); $firstGenre = null; foreach ($composer->contributors as $contributor) { if ($contributor->song && $contributor->song->genre) { $firstGenre = $contributor->song->genre->name; break; } } $roleArray = $composer->getRoleNames(); $roleContent = ''; foreach ($roleArray as $role) { if ($role == 'Composer') { $roleContent = $roleContent . ' 🎵 Composer '; } if ($role == 'Artist') { $roleContent = $roleContent . ' 🎤 Artist '; } if ($role == 'Cover Creator') { $roleContent = $roleContent . ' 📹 Cover Creator '; } } @endphp
@php // $composerx = [ // 'id' => $id, // 'name' => 'Composer ' . $id, // 'genre' => ['Contemporary Classical', 'Film Score', 'Orchestral', 'Minimalist'][$id % 4], // 'bio' => // 'A renowned composer with a unique style, known for creating emotional and powerful compositions that resonate with audiences worldwide.', // 'image' => 'https://picsum.photos/seed/composer' . $id . '/400/400', // 'banner' => 'https://picsum.photos/seed/comp' . $id . '/1200/400', // 'followers' => rand(10, 100) . 'K', // 'compositions' => rand(20, 50), // 'awards' => rand(3, 15), // ]; $topTracks = [ ['title' => 'Opus ' . rand(1, 99), 'year' => rand(2010, 2023), 'duration' => '4:' . rand(10, 59)], [ 'title' => 'Symphony No. ' . rand(1, 9), 'year' => rand(2010, 2023), 'duration' => '6:' . rand(10, 59), ], [ 'title' => 'Requiem for a ' . ['Dream', 'Memory', 'Life', 'Soul'][$id % 4], 'year' => rand(2010, 2023), 'duration' => '5:' . rand(10, 59), ], [ 'title' => 'Piano Concerto in ' . ['C Minor', 'D Major', 'G Minor', 'A Major'][$id % 4], 'year' => rand(2010, 2023), 'duration' => '7:' . rand(10, 59), ], [ 'title' => 'The ' . ['Journey', 'Awakening', 'Revelation', 'Discovery'][$id % 4], 'year' => rand(2010, 2023), 'duration' => '3:' . rand(10, 59), ], ]; // $albumsx = [ // [ // 'title' => 'Orchestral Works Vol. ' . rand(1, 3), // 'year' => rand(2015, 2023), // 'tracks' => rand(8, 12), // 'img' => 'https://picsum.photos/seed/comp_album' . $id * 2 . '/300/300', // ], // [ // 'title' => 'Film Scores Collection', // 'year' => rand(2015, 2023), // 'tracks' => rand(8, 12), // 'img' => 'https://picsum.photos/seed/comp_album' . $id * 3 . '/300/300', // ], // [ // 'title' => 'Piano Compositions', // 'year' => rand(2015, 2023), // 'tracks' => rand(8, 12), // 'img' => 'https://picsum.photos/seed/comp_album' . $id * 4 . '/300/300', // ], // [ // 'title' => 'Ambient Soundscapes', // 'year' => rand(2015, 2023), // 'tracks' => rand(8, 12), // 'img' => 'https://picsum.photos/seed/comp_album' . $id * 5 . '/300/300', // ], // ]; @endphp
{{ $composer->name }}
{{ $composer->name }}

{{ $composer->name }}

{{ $firstGenre }}

{{ $followers }} followers
{{ $totalSongs }} compositions
{{--
{{ $composerx['awards'] }} awards
--}}
@php $isFollowingClass = $isFollowing ? 'following' : ''; $iconClass = $isFollowing ? 'ti-check' : 'ti-user-plus'; $buttonText = $isFollowing ? 'Following' : 'Follow'; @endphp

About {{ $composer->name }}

@php $biography = 'Belum terdapat data mengenai composer ini'; if ($composer->profile) { $biography = $composer->profile->bio0; } $maxLength = 255; $isLong = strlen($biography) > $maxLength; $shortBio = $isLong ? substr($biography, 0, $maxLength) : $biography; @endphp

{{ $shortBio }}@if ($isLong) ... @endif

@if ($isLong) @endif

Popular Song

@php $index = 0; @endphp @if ($songComposes->isNotEmpty()) @forelse ($songComposes as $row) @if ($row->song) @php $index++; @endphp
{{ $index }}
{{ $row->song->title ?? '-' }}
{{ $row->song?->created_at?->format('Y') ?? '-' }}
{{ $row->song->duration ?? '' }}
@endif @empty @endforelse @if ($index == 0)
belum terdapat data
@endif @else
belum terdapat data
@endif

Albums & Songs

@forelse ($albums as $album) @php dd($album); $coverImg = app(\App\Services\AlbumServices::class)->getCoverImageS3($album, 'md'); $totalTrack = app(\App\Services\AlbumServices::class)->totalSong($album->id); @endphp
{{ $album->title }}

{{ $album->title }}

{{ $album->created_at->format('Y') }} • {{ $totalTrack }} tracks

@empty belum terdapat data @endforelse {{-- @foreach ($albums as $album)
{{ $album['title'] }}

{{ $album['title'] }}

{{ $album['year'] }} • {{ $album['tracks'] }} tracks

@endforeach --}}
@if (\App\Services\UserServices::isMutualFollow($composer->id))

Lagu Belum Release

See All
@php $index = 0; @endphp @foreach ($songBeforeRelease as $row) @php $song = $row->song; @endphp @if ($song) @php $index++; $imageUrl = app(\App\Services\SongServices::class)->getCoverImageS3($song, 'sm'); @endphp @php $creatorName = $song->songContributors ->where('role', 'Composer') ->pluck('user.name') ->filter() ->implode(', ') ?? '-'; if (empty($creatorName)) { $creatorName = '-'; } $artistName = $song->songContributors ->filter(function ($contributor) { return in_array($contributor->role, ['Artist', 'Cover Creator']); }) ->pluck('user.name') ->filter() ->implode(', ') ?: ' '; if (empty($artistName)) { $artistName = 'No Artist'; } @endphp
{{ $song->title }}

{{ $song->title }}

{{ $song->created_at->format('D d M Y') }}

@endif @endforeach @if ($index == 0)
belum terdapat data
@endif
@endif

Similar Composers

@forelse ($similarComposer as $composer) @php $avatarUrl = app(\App\Services\UserServices::class)->getAvatar($composer, 'md'); $firstGenre = null; foreach ($composer->contributors as $contributor) { if ($contributor->song && $contributor->song->genre) { $firstGenre = $contributor->song->genre->name; break; } } @endphp

{{ $composer->name }}

{{ $firstGenre }}

@empty belum terdapat data @endforelse {{-- @for ($i = 1; $i <= 6; $i++) @php $similarId = (($id + $i) % 10) + 1; @endphp

Composer {{ $similarId }}

{{ ['Classical', 'Film Score', 'Contemporary', 'Minimalist'][$similarId % 4] }}

@endfor --}}
FEATURED WORK

{{ $topTracks->title ?? '' }}

Experience this acclaimed composition that showcases the unique style and artistic vision of {{ $topTracks->artist->name ?? 'composer' }}.

@endsection @section('scripts') @endsection