@extends('layouts.admin.main') @section('title', __('Program')) @section('style') @endsection @section('rightbar-content')

Schedule Details - {{date('d-m-Y')}} - {{date('d-m-Y', strtotime("+6 days"))}}

Total Schedules : 0
Total Available : 0
Total Missing : 0
@if(count($upcoming_schedule) > 0) @php $i=1; $missing = 0; @endphp @foreach($upcoming_schedule as $k => $schedule) @php $endTime=null; @endphp @foreach($schedule as $key => $program) @php $start = \Carbon\Carbon::parse($program->start_time); $dataMissing=""; if($endTime){ // check difference between end time and start time in seconds $diff = $start->diffInSeconds($endTime); if($diff > 120){ $dataMissing = "data-missing"; } } if($dataMissing){ $missing +=1; echo ''; } @endphp @php $src = ''; $artists =$program->artist_name ? json_decode($program->artist_name,true) : []; $artist_name = ''; $artistsDetails = Modules\Artist\Entities\Artist::whereIn('id',$artists)->get(); foreach($artistsDetails as $artist){ $artist_name .= $artist->artist_name.','; } $artist_name = rtrim($artist_name,','); $endTime = \Carbon\Carbon::parse($program->end_time); // $src = asset('/images/programs/'.$song->image); @endphp {{-- --}} @endforeach @endforeach @endif
S.No Date Start Time End Time Duration Program Presenter
Schedule missing From '.\Carbon\Carbon::parse($endTime)->format("h:i A").' To '.\Carbon\Carbon::parse($start)->format("h:i A").'
{{ $i++ }} {{$k}} {{\Carbon\Carbon::parse($program->start_time)->format("h:i A") }} {{\Carbon\Carbon::parse($program->end_time)->format("h:i A") }} {{-- show duration --}} @php $start_time = \Carbon\Carbon::parse($program->start_time); $end_time = \Carbon\Carbon::parse($program->end_time); $duration = $start_time->diff($end_time)->format('%H:%I'); @endphp {{$duration}} {{$program->program_name}} {{$artist_name}}{{ \Carbon\Carbon::parse($song->created_at)->diffForHumans() }}
@endsection @section('script') @endsection