@if(count($profile->purchased))
@foreach($profile->purchased AS $item)
@if(isset($item->object))
@if($item->orderable_type === 'App\Models\Album')
{{ \Carbon\Carbon::parse($item->created_at)->format('M d, Y h:m') }}
@foreach($item->object->songs()->get() AS $song)
@include('commons.purchased_song', ['song' => $song])
@endforeach
@else
{{ \Carbon\Carbon::parse($item->created_at)->format('M d, Y h:m') }}
@include('commons.purchased_song', ['song' => $item->object])
@endif
@endif
@endforeach
@else
{{ __('web.YOU_DIDNT_BOUGHT_ANYTHING_YET') }}
{{ __('web.YOU_DIDNT_BOUGHT_TIP') }}
@endif
@endsection