@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 }}
{{ $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
@if (\App\Services\UserServices::isMutualFollow($composer->id))
@endif
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