@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) @php($video_ext = Config('global.video_extensions')) @php($image_ext = Config('global.image_extensions')) @foreach ($medias as $key => $media) @php($info = new \SplFileInfo($media)) @php($ext = $info->getExtension()) @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)
{{--
--}} {{ !empty($content->title) ? $content->title : date('M - d - Y') }} {{ !empty($content->getContentScreens) ? count($content->getContentScreens) : 0 }} {{ date('M d - Y', strtotime($content->start_date)) }} {{ date('M d - Y', strtotime($content->end_date)) }} {{ number_format($content->price, 0) }} {{ !empty($content->contentMedias) ? count($content->contentMedias) : 0 }} {{ $total_slot }} {{ !empty($viewers) ? thousandsCurrencyFormat($viewers) : 0 }} {{ $status }} @php($i++) @endforeach @else @if(!empty($filter))

No data available

@endif @endif