@extends('index') @section('content') @include('homepage.nav')
@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') }}

{{ $item->object->title }}
{{ $item->object->title }}

@foreach($item->object->artists as $artist){!! $artist->name !!}@if(!$loop->last), @endif @endforeach

@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