@foreach($genres as $genre) @php $moviegenreitems = NULL; $moviegenreitems = array(); foreach ($menu_data as $key => $item) { $gmovie = \DB::table('movies') ->select('movies.id as id','movies.title as title','movies.type as type','movies.status as status','movies.genre_id as genre_id','movies.thumbnail as thumbnail','movies.slug as slug','movies.is_custom_label as is_custom_label','movies.label_id as label_id') ->where('movies.is_upcoming','!=' ,1) ->where('movies.genre_id', 'LIKE', '%' . $genre->id . '%')->where('movies.id',$item->movie_id)->first(); if(isset($gmovie)){ $moviegenreitems[] = $gmovie; } if($section->order == 1){ arsort($moviegenreitems); } if(count($moviegenreitems) == $section->item_limit){ break; exit(1); } } $moviegenreitems = array_values(array_filter($moviegenreitems)); foreach ($menu_data as $key => $item) { $gtvs = \DB::table('tv_series') ->join('seasons','seasons.tv_series_id','=','tv_series.id') ->select('seasons.id as seasonid','tv_series.genre_id as genre_id','tv_series.id as id','tv_series.type as type','tv_series.status as status','tv_series.title as title','tv_series.thumbnail as thumbnail','seasons.season_slug as season_slug','tv_series.is_custom_label as is_custom_label','tv_series.label_id as label_id')->where('tv_series.genre_id', 'LIKE', '%' . $genre->id . '%') ->where('tv_series.id',$item->tv_series_id)->first(); if(isset($gtvs)){ array_push($moviegenreitems, $gtvs); } if($section->order == 1){ arsort($moviegenreitems); } if(count($moviegenreitems) == $section->item_limit*2){ break; exit(1); } } $moviegenreitems = array_values(array_filter($moviegenreitems)); @endphp @if($moviegenreitems != NULL && count($moviegenreitems)>0)
{{ $genre->name }} in {{ $menu->name }}

{{__('at the big screen at home')}}

@if($auth && getSubscription()->getData()->subscribed == true) {{__('View All')}} @else {{__('View All')}} @endif
@if($section->view == 1)
@endif @if($section->view == 0)
@foreach($moviegenreitems as $item) @php if(isset($auth) && $auth != NULL){ if ($item->type == 'M') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $item->id], ])->first(); } } $gets1 = App\Season::where('tv_series_id','=',$item->id)->first(); if (isset($gets1) && $auth != NULL) { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $gets1->id], ])->first(); } @endphp @if($item->status == 1) @if($item->type == 'M') @php $image = 'images/movies/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = url('images/default-thumbnail.jpg'); } @endphp
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @else genre-image @endif @else @if($src) genre-image @else genre-image @endif @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif
@if($auth && getSubscription()->getData()->subscribed == true) {{$item->title}} @else {{$item->title}} @endif
@endif @if($item->type == 'T') @php $image = 'images/tvseries/thumbnails/'.$item->thumbnail; // Read image path, convert to base64 encoding $imageData = base64_encode(@file_get_contents($image)); if($imageData){ // Format the image SRC: data:{mime};base64,{data}; $src = 'data: '.mime_content_type($image).';base64,'.$imageData; }else{ $src = url('images/default-thumbnail.jpg'); } @endphp
@if($auth && getSubscription()->getData()->subscribed == true) @if($src) genre-image @else genre-image @endif @else @if($src) genre-image @else genre-image @endif @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif
@if($auth && getSubscription()->getData()->subscribed == true)
{{$item->title}}
@else
{{$item->title}}
@endif
@endif @endif @endforeach
@endif

@endif @endforeach @section('custom-script') @endsection @if(selected_lang()->rtl == 0) @else @endif {{-- --}} {{-- start rating js --}}