@extends('layouts.front.main') @section('title', __('frontWords.album_single')) @section('content') @if($artist->count() > 0) @php $programPlaylist = []; $sharePath =route('presenters_view',array('slug' => $artist->artist_slug)); $shareslug = $artist->artist_slug; @endphp;
@php $src = ''; $src = asset('/images/artist/'.$artist->image); @endphp

{{ $artist->artist_name }}

{{ $artist->genre->genre_name ?? '' }}

{!! $artist->description !!}

{{--
  • Date
  • Recently Added
  • Behind the Mic
  • Duration
  • More
@if(count($songs) > 0) @php $i = 1; @endphp @foreach($songs as $song) @php $artist_id = json_decode($song->artist_id); $artist_array = []; foreach($artist_id as $artist){ $artists = Modules\Artist\Entities\Artist::select('artist_name')->where('id',$artist)->first(); if( $artists){ $artist_array[] = $artists->artist_name; } } $artist_name = implode(',',$artist_array); @endphp @php $i++; @endphp @endforeach @endif
--}} @php $songsList = []; @endphp @if(count($songs) > 0) @php $i = 1; // $songs = $songs->sortByDesc('id'); @endphp @foreach($songs as $song) @php $artist_id = json_decode($song->artist_id); $artist_array = []; foreach($artist_id as $artist){ $artists = Modules\Artist\Entities\Artist::select('artist_name')->where('id',$artist)->first(); if($artists){ $artist_array[] = $artists->artist_name; } } $artist_name = implode(',',$artist_array); // $programPlaylist[] =audioPath($song);// ['title' => $song->audio_title, 'artist' => $artist_name, 'mp3' => audioPath($song)]; // dd($programPlaylist); $playlistItem = [ 'src' => audioPath($song), 'title' => $song->audio_title, 'artist' => $artist_name, 'poster' => $song->image, 'id' => count($songsList)+50, "song_id" => $song->id, 'song_name' => $song->audio_title, "program" => $song->parent_program->program_name ?? '', ]; $songsList[] = [ "songs" => $song, "artist_name" => $artist_name, 'id' =>$playlistItem['id'] ]; $playlist[] = $playlistItem; @endphp @endforeach @endif @include('front.components.playlist_component')
@endif
@if($songs->count() > 0) @foreach($songs as $list) @php $src = ''; $src = asset('/images/audio/thumb/'.$list->image); @endphp @endforeach @endif
{{--
@if($album[0]->image != '' && file_exists(public_path('images/album/'.$album[0]->image))) @else @endif
  • #
  • {{ __('frontWords.track_title') }}
  • {{ __('frontWords.artist') }}
  • {{ __('frontWords.duration') }}
  • {{ __('frontWords.more') }}
@php if(!empty($song_list)){ $cnt = 0; foreach($song_list as $song){ $audioDetail = audioDetail(['songid' => $song]); if(!empty($audioDetail)){ foreach($audioDetail as $audios){ $cnt++; $getArtist = json_decode($audios->artist_id); $artist_name = ''; foreach($getArtist as $artistName){ $artists = select(['column'=>'artist_name','table'=>'artists','where'=>['id'=>$artistName] ]); if(count($artists) > 0){ $artist_name .= $artists[0]->artist_name.','; } } $getLikeDislikeAudio = getFavDataId(['column' => 'audio_id', 'audio_id' => $audios->id]); @endphp @php } } } } @endphp
--}} @php $jsonPlaylist = json_encode($playlist,JSON_HEX_APOS); @endphp @endsection @section('script') @endsection