@extends('layouts.app') @section('content')
@php $avatarUrl = app(\App\Services\UserServices::class)->getAvatar($user, 'md'); @endphp

{{ auth()->user()->name }}

{{ auth()->user()->email }}
{{ auth()->user()->role }} @php $verification = \App\Models\Verification::where('user_id', auth()->id()) ->where('status', 'approved') ->latest() ->first(); @endphp @if ($verification) {{ ucfirst($verification->type) }} Verified @endif
{{ $uploadedsongs->count() }}
Songs
{{ $user->followers_count }}
Followers
{{ $user->following_count }}
Following

My Assets (Semua)

@foreach ($songs as $songContributor) @php $composers = ''; if ($songContributor->role == 'Composer') { $composers = $songContributor->user->name; } $imageUrl = app(\App\Services\SongServices::class)->getCoverImageS3($songContributor->song, 'md'); @endphp
{{ $songContributor->song->created_at->format('j M Y H:m') }}
{{ $songContributor->song->title }}
cipt. {{ $composers }}
{{ $songContributor->song->status }} @php $bgTypes = 'text-bg-danger'; if ($songContributor->song->types == 'sudah release') { $bgTypes = 'text-bg-dark'; } @endphp {{ $songContributor->song->types }}
@endforeach
{{--
@foreach ($songs as $songContributor) @php $coverImages = explode(',', $songContributor->song->cover_image ?? ''); $smallCoverFile = $coverImages[2] ?? null; $filename = $smallCoverFile ? basename($smallCoverFile) : null; $imageUrl = $filename ? route('user.songs.image', ['filename' => $filename]) : url('/img/cover_default.png'); @endphp
@endforeach @if ($songs->isEmpty()) @endif
Title Date Status
{{ $songContributor->song->title }}
{{ $songContributor->user->name ?? 'Unknown Artist' }}
{{ $songContributor->created_at->format('M d, Y') }} @php $status = $songContributor->song->status ?? 'Draft'; $statusClass = [ 'Active' => 'bg-success', 'Pending' => 'bg-warning', 'Published' => 'bg-primary', 'Draft' => 'bg-secondary', ][$status] ?? 'bg-secondary'; @endphp @foreach (explode(' ', $status) as $word) {{ $word }} @endforeach
Tidak ada lagu yang ditemukan.
--}}
{{ $songs->links() }} {{-- --}}

Purchased Songs

@php $i = 0; @endphp @forelse ($orders as $item) @php $i++; $avatar = app('App\Services\UserServices')->getAvatar($item->user, 'sm'); $fullName = $item->user->name; $payment_status = $item->payment_status; $bgClass = 'text-bg-success'; $resultCode = '01'; if ($payment_status == 'pending' || $payment_status == 'unpaid' || $payment_status == 'failed') { $payment_status = $payment_status == 'pending' || $payment_status == 'unpaid' ? 'unpaid' : $payment_status; $resultCode = '01'; if ($payment_status == 'failed') { $resultCode = '02'; } $bgClass = 'text-bg-danger'; } else { $resultCode = '00'; } @endphp @foreach ($item->orderItem as $orderItem) @php $lcsPrice = $orderItem->price; $songId = $orderItem->songLicense->song_id; $license_type = $orderItem->songLicense->license_type; $payment_type = $orderItem->songLicense->payment_type; $time_amount = $orderItem->songLicense->time_amount; $time_amount = $time_amount && $time_amount !== 'null' && $time_amount !== 0 ? $time_amount : ''; $time_type = $orderItem->songLicense->time_type; $time_type = $time_type && $time_type !== 'null' ? $time_type : ''; $zone = $orderItem->songLicense->zone; $songTitle = $orderItem->songLicense->song->title; $coverImage = app(\App\Services\SongServices::class)->getCoverImageS3($orderItem->songLicense->song, 'sm'); $composerNames = $orderItem->songLicense->song->songContributors ->filter(function ($contributor) { return $contributor->role === 'Composer'; }) ->pluck('user.name') ->implode(', '); $artistNames = $orderItem->songLicense->song->songContributors ->filter(function ($contributor) { return $contributor->role === 'Artist' || $contributor->role === 'Cover Creator'; }) ->pluck('user.name') ->implode(', '); @endphp @endforeach
{{-- Song Cover --}}
{{ $songTitle }}
{{ $artistNames }}
License
{{ $payment_status }} {{-- --}}
@empty @endforelse {{-- @for ($i = 1; $i <= 6; $i++)
Song Cover
Purchased Song {{ $i }}
Artist Name {{ $i }}
Licensed
@endfor --}}

My Cover Songs

@php $statuses = ['Published', 'Draft', 'Processing']; @endphp @for ($i = 1; $i <= 5; $i++) @endfor
Cover Title Original Artist Date Created Status Stats
Cover of Song {{ $i }}
{{ rand(1, 5) }}:{{ sprintf('%02d', rand(0, 59)) }}
Original Artist {{ $i }} {{ now()->subDays(rand(1, 30))->format('M d, Y') }} @php $status = $statuses[array_rand($statuses)]; $statusClass = [ 'Published' => 'bg-success', 'Draft' => 'bg-secondary', 'Processing' => 'bg-warning', ][$status]; @endphp {{ $status }}
{{ rand(100, 9999) }} {{ rand(10, 999) }}

Released Songs

@for ($i = 1; $i <= 6; $i++)
Release Cover
Released Song {{ $i }}
Album: {{ rand(0, 1) ? 'Single' : 'Album Name ' . $i }}
{{ now()->subMonths(rand(1, 12))->format('M Y') }}
{{ number_format(rand(1000, 1000000)) }} plays
{{ number_format(rand(100, 10000)) }}
@endfor

Unreleased Songs (Drafts)

@for ($i = 1; $i <= 5; $i++)
Draft Song {{ $i }}
Last edited: {{ now()->subDays(rand(1, 14))->format('M d, Y') }}
{{ rand(30, 95) }}% Complete
@endfor

Ready to release your music?

Complete your drafts and share your music with the world.

My Uploads (Composer)

{{-- --}}
@foreach ($uploadedsongs as $uploadsongs) @php $artistName = ''; foreach ($uploadsongs->songContributors as $ctr) { if ($ctr->user->getRoleNames()->contains('Artist')) { $artistName = 'Artis. ' . $ctr->user->name; break; } } $imageUrl = app(\App\Services\SongServices::class)->getCoverImageS3($uploadsongs, 'sm'); @endphp
@endforeach
Total Plays
{{ number_format(rand(5000, 50000)) }}
Growth
{{ rand(5, 15) }}%
Total Assets
{{ rand(10, 100) }}
Growth
{{ rand(3, 12) }}%
Revenue
Rp {{ number_format(rand(100000, 5000000)) }}
Growth
{{ rand(8, 20) }}%
Followers
{{ number_format(rand(100, 5000)) }}
Growth
{{ rand(5, 25) }}%

Recent Activity

@php $activities = [ [ 'icon' => 'ti ti-music', 'color' => 'primary', 'text' => 'You uploaded a new song', 'time' => '10 minutes ago', ], [ 'icon' => 'ti ti-license', 'color' => 'success', 'text' => 'Your license was purchased by a user', 'time' => '2 hours ago', ], [ 'icon' => 'ti ti-heart', 'color' => 'red', 'text' => 'Someone liked your cover song', 'time' => '5 hours ago', ], [ 'icon' => 'ti ti-user-plus', 'color' => 'blue', 'text' => 'You have a new follower', 'time' => 'Yesterday', ], [ 'icon' => 'ti ti-coin', 'color' => 'yellow', 'text' => 'You received a royalty payment', 'time' => '2 days ago', ], ]; @endphp @foreach ($activities as $activity)
{{ $activity['text'] }}
{{ $activity['time'] }}
@endforeach
@endsection @push('styles') @endpush @section('scripts') @endsection