@extends('layouts.theme') @section('custom-meta') @endsection @section('title',"$audio->title") @section('main-wrapper') @php $auth = Illuminate\Support\Facades\Auth::user(); $subscribed = null; $withlogin= $configs->withlogin; $catlog = $configs->catlog; @endphp
@if(isset($audio)) @if($audio->poster != null)
@else
@endif @endif
@if(isset($audio))

{{$audio->title}}


@if(Auth::check() && getSubscription()->getData()->subscribed == true) @if(Auth::check() && Auth::user()->is_admin == '1') {{__('Play Now')}} @else {{__('Play Now')}} @endif @endif

{{$audio->detail}}

@if($audio->thumbnail != null || $audio->thumbnail != '') genre-image @else genre-image @endif
@endif
{{-- comments section start from here --}} @if(isset($audio)) @if($configs->comments == 1 || $configs->user_rating == 1)

@if($configs->comments == 1)
@if(isset($audio->comments) && $audio->comments->isEmpty())

 {{__('No comments yet!')}}

  {{__('Be the first to share what you think !')}}
@else

{{$audio->comments->where('status',1)->count()}} {{__('Comment')}}


@foreach ($audio->comments->where('status','1') as $comment)

{{$comment->name}}

{{date('F jS, Y - g:i a',strtotime($comment->created_at))}}

@if(Auth::check() && (Auth::user()->is_admin == 1 || $comment->user_id == Auth::user()->id)) @endif @if(getSubscription()->getData()->subscribed == true) @endif
{{$comment->comment}}
@foreach($comment->subcomments->where('status',1) as $subcomment)
@php $name=App\user::where('id',$subcomment->user_id)->first(); @endphp
{{$name->name}}

{{date('F jS, Y - g:i a',strtotime($subcomment->created_at))}}

@if(Auth::check() && (Auth::user()->is_admin == 1 || $subcomment->user_id == Auth::user()->id)) @endif
{{$subcomment->reply}}
@endforeach @endforeach @endif
@auth

{{__('Post Comment')}}:


{{Form::open( ['route' => ['audio.comment.store', $audio->id], 'method' => 'POST'])}}
{{Form::label('comment',__('Comment'))}} {{Form::textarea('comment', null, ['class' => 'form-control', 'rows'=> '5','cols' => '9'])}}
{{Form::submit(__('Add Comment'), ['class' => 'btn btn-md btn-default'])}}
@endauth @endif @endif @endif @endsection @section('custom-script') @endsection