@if (isset($data)) @php $search_songs = count($data); // $search_songs = 2; @endphp @if ($search_songs >= 3)
@foreach ($data ?? [] as $search_song)
{{ $search_song['song_title'] }}

{{ $search_song['songwriter_name'] }}

@php for ($i = 1; $i <= $search_song['total_rating']; $i++) { echo '
  • '; } @endphp

    Dipopulerkan oleh :

    {{ $search_song['attributes']['0']['value'] }}

    Rilis :

    {{ $search_song['attributes']['1']['value'] }}

    Platform :

    {{ $search_song['attributes']['2']['value'] }}

    Genre :

    {{ $search_song['attributes']['3']['value'] }}
    Beli Lisensi
    @endforeach
    @elseif($search_songs == 2)
    @foreach ($data ?? [] as $search_song)
    {{ $search_song['song_title'] }}

    {{ $search_song['songwriter_name'] }}

    @php for ($i = 1; $i <= $search_song['total_rating']; $i++) { echo '
  • '; } @endphp

    Dipopulerkan oleh :

    {{ $search_song['attributes']['0']['value'] }}

    Rilis :

    {{ $search_song['attributes']['1']['value'] }}

    Platform :

    {{ $search_song['attributes']['2']['value'] }}

    Genre :

    {{ $search_song['attributes']['3']['value'] }}
    Beli Lisensi
    @endforeach
    @elseif($search_songs <= 1) @foreach ($data ?? [] as $search_song)
    {{ $search_song['song_title'] }}

    {{ $search_song['songwriter_name'] }}

    @php for ($i = 1; $i <= $search_song['total_rating']; $i++) { echo '
  • '; } @endphp

    Dipopulerkan oleh :

    {{ $search_song['attributes']['0']['value'] }}

    Rilis :

    {{ $search_song['attributes']['1']['value'] }}

    Platform :

    {{ $search_song['attributes']['2']['value'] }}

    Genre :

    {{ $search_song['attributes']['3']['value'] }}
    Beli Lisensi
    @endforeach @endif @endif