@php($i = 0) @if(!$contents->isEmpty()) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias = DB::table('media')->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) {{-- @if($status == 'Current') --}}

{{ !empty($content->title) ? $content->title : date('M - d - Y') }}

@php($i++) {{-- @endif --}} @endforeach @else

No data available

@endif
@php($i = 0) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias = DB::table('media')->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) @if($status == 'Current')

{{ !empty($content->title) ? $content->title : date('M - d - Y') }}

@php($i++) @endif @endforeach
@php($i = 0) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias = DB::table('media')->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) @if($status == 'Future')

{{ !empty($content->title) ? $content->title : date('M - d - Y') }}

@php($i++) @endif @endforeach
@php($i = 0) @foreach($contents as $content) @php($screen_ids = $content->getContentScreens->pluck('screen_id')->toArray()) @php($viewers = DB::table('screens')->whereIn('id', $screen_ids)->sum('viewer')) @php($media_ids = $content->contentMedias->pluck('media_id')->toArray()) @php($medias = DB::table('media')->whereIn('id', $media_ids)->pluck('path')->toArray()) @if($content->start_date > date('Y-m-d')) @php($status = 'Future') @elseif($content->end_date < date('Y-m-d')) @php($status = 'Past') @elseif($content->start_date >= date('Y-m-d') || $content->start_date <= date('Y-m-d')) @php($status = 'Current') @endif @php($total_slot = 0) @php($slot_count = 0) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @if(in_array($ext,$video_ext)) @php($getID3 = new \getID3) @php($file = $getID3->analyze(public_path('uploads/items/video/'.$media))) @php($duration = seconds_from_time(date('H:i:s', $file['playtime_seconds']))) @php($duration_actual = (date('H:i:s', $file['playtime_seconds']))) @php($_slot_count = $duration/15) @php($slot_count += ceil($_slot_count)) @elseif(in_array($ext,$image_ext)) @php($slot_count += 1) @endif @endforeach @php($total_slot += $slot_count) @if($status == 'Past')

{{ !empty($content->title) ? $content->title : date('M - d - Y') }}

@php($i++) @endif @endforeach