@extends('layouts.front.main') @section('title', __('frontWords.album_single')) @section('content') @if($podcast->count() > 0) @php $programPlaylist = []; $sharePath =route('single_album',array('slug' => $podcast->album_slug)); $shareslug = $podcast->album_slug; @endphp;
@php $src = ''; // $src = asset('/images/podcast/'.$podcast->image); // if($podcast->image != '' && strpos($podcast->image, 'https://') !== false || strpos($podcast->image, 'http://') !== false) // $src = $podcast->image; // else if($podcast->image != '' && file_exists(public_path('images/podcast/'.$podcast->image))) // $src = asset('images/podcast/'.$podcast->image); // else $src = imagePath($podcast->image,"podcast",""); @endphp

{{ $podcast->album_name }}

@php $artist_name =[]; if(isset($podcast->artist_name) && $podcast->artist_name!=""){ foreach(json_decode($podcast->artist_name) as $key => $value){ $artist_name[] = \Modules\Artist\Entities\Artist::find($value)->artist_name; } } @endphp

{{ implode(', ',$artist_name) }}

{!! $podcast->description !!}

@php $directories = $podcast->directory_links; $directories = $directories ? json_decode($directories,true) : []; // check GooglePodcasts, ApplePodcasts or Spotify is set or not // dd($directories); @endphp @if($directories && ($directories['GooglePodcasts'] != null || $directories['ApplePodcasts'] != "" || $directories['Spotify'] != null))
More ways to listen

    @if(isset($directories['ApplePodcasts']) && $directories['ApplePodcasts']!="" && $directories['ApplePodcasts']!=null)
  • @endif @if(isset($directories['Spotify']) && $directories['Spotify']!="" && $directories['Spotify']!=null)
  • @endif @if(isset($directories['GooglePodcasts']) && $directories['GooglePodcasts']!="" && $directories['GooglePodcasts']!=null)
  • @endif
@endif
{{--
  • 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); //if($song->parent_program){ $playlistItem = [ 'src' => audioPath($song), 'title' => $song->audio_title ??"", 'artist' => $artist_name, 'poster' => $song->image, 'id' => count($playlist)+50, "song_id" => $song->id, 'song_name' => $song->audio_title ?? "", "program" =>$song->parent_program ? $song->parent_program->program_name : $artist_name, ]; $playlist[] = $playlistItem; $songsList[] = [ "songs" => $song, "artist_name" => $artist_name, "id"=>$playlistItem['id'] ]; // } @endphp @endforeach @endif @php // dd($songsList) @endphp @include('front.components.playlist_component',$songsList)
@endif

Newly Released Podcast

@if($podcasts->count() > 0) @php $newplaylist = []; $i=0; @endphp @foreach($podcasts as $list) @php $src = ''; // $src = asset('/images/podcast/'.$list->image); if($list->image != '' && strpos($list->image, 'https://') !== false || strpos($list->image, 'http://') !== false) $src = $list->image; else if($list->image != '' && file_exists(public_path('images/podcast/'.$list->image))) $src = asset('images/podcast/'.$list->image); else $src = dummyImage('custom',$list->album_slug,500); //$songs = Modules\Audio\Entities\Audio::where('album_id',$list->id)->where('status',1)->get(); $songs = $list->song_list ? json_decode($list->song_list) : []; // dd($songs); $newPlaylistItem = []; if(is_array($songs) && count($songs) > 0){ $songs = Modules\Audio\Entities\Audio::where('id',end($songs))->where('status',1)->first(); if($songs == null){ continue; } // if($song->parent_program){ $newPlaylistItem = [ 'src' => audioPath($songs), 'title' => $songs->audio_title ?? "", 'artist' =>"", 'poster' => $songs->image, 'id' => count($newplaylist) + 20, "song_id" => $song->id, 'song_name' => $song->audio_title ?? "", "program" =>$song->parent_program ? $song->parent_program->program_name : "", ]; $newplaylist[] =$newPlaylistItem; // } }else{ continue; } @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