@extends('website.layouts.master') @section('title', __('home_page')) @section('content') @if (count($genres))

{{ __('explore_by_genre') }}

@foreach ($genres as $genre) @endforeach
@endif @if (count($watch_histories) && auth()->user())

{{ __('continue_watching') }}

@foreach ($watch_histories as $history) @php // Skip if the movie is null if (!$history->movie) { continue; } if ($history->watchable_type == 'movie') { $thumbnail = $history->movie->thumbnail; $title = $history->movie->title; $movie_id = $history->movie->id; if ( (is_rent_expire('movie', $movie_id) && is_rental('movie', $movie_id)) || is_free('movie', $movie_id) || (check_subscription() && !is_rental('movie', $movie_id)) || is_admin() ) { $video_url = route('watch.movie', [ 'slug' => $history->movie->slug, ]); } } else { $thumbnail = $history->episode->poster; $title = $history->episode->episode_name; $series_id = $history->episode->tv_show_id; $order = $history->episode->order; if ( (is_rent_expire('series', $series_id) && is_rental('series', $series_id)) || is_free('series', $series_id) || (check_subscription() && !is_rental('series', $series_id)) || is_admin() ) { $video_url = route('watch.episode', [ 'slug' => $history->episode->slug, ]); } } @endphp @endforeach
@endif @if (count($latest_movies) > 0)

{{ __('latest_movies') }}

@foreach ($latest_movies as $movie)
movie
@if ($movie->is_free == 1) @elseif ($movie->is_rental == 1)
{{ __('rent:') . ' ' . get_currency($movie->rental_price) }}
@else
{{ __('premium') }}
@endif
{{ $movie->title }}
{{ date('Y', strtotime($movie->release)) }}
{{ get_rating($movie->imdb_rating) }}
{{ runtime($movie->runtime) }}
{{ get_movie_genre($movie->genre) }} @if (get_movie_category($movie->video_type)) {{ get_movie_category($movie->video_type) }} @endif {{ get_movie_quality($movie->video_quality) }}
@endforeach
@endif @if (count($top_view_today) > 0)

{{ __('top_view_today') }}

@foreach ($top_view_today as $movie)
movie
@if ($movie->is_free == 1) @elseif ($movie->is_rental == 1)
{{ __('rent:') . ' ' . get_currency($movie->rental_price) }}
@else
{{ __('premium') }}
@endif
{{ $movie->title }}
{{ date('Y', strtotime($movie->release)) }}
{{ get_rating($movie->imdb_rating) }}
{{ runtime($movie->runtime) }}
{{ get_movie_genre($movie->genre) }} @if (get_movie_category($movie->video_type)) {{ get_movie_category($movie->video_type) }} @endif {{ get_movie_quality($movie->video_quality) }}
@endforeach
@endif @if (count($top_rating_movies) > 0)

{{ __('top_rating') }}

@foreach ($top_rating_movies as $movie)
movie
@if ($movie->is_free == 1) @elseif ($movie->is_rental == 1)
{{ __('rent:') . ' ' . get_currency($movie->rental_price) }}
@else
{{ __('premium') }}
@endif
{{ $movie->title }}
{{ date('Y', strtotime($movie->release)) }}
{{ get_rating($movie->imdb_rating) }}
{{ runtime($movie->runtime) }}
{{ get_movie_genre($movie->genre) }} @if (get_movie_category($movie->video_type)) {{ get_movie_category($movie->video_type) }} @endif {{ get_movie_quality($movie->video_quality) }}
@endforeach
@endif @if (count($trending_movies))

{{ __('trending_movies') }}

@foreach ($trending_movies as $movie)
movie
@if ($movie->is_free == 1) @elseif ($movie->is_rental == 1)
{{ __('rent:') . ' ' . get_currency($movie->rental_price) }}
@else
{{ __('premium') }}
@endif
{{ $movie->title }}
{{ date('Y', strtotime($movie->release)) }}
{{ get_rating($movie->imdb_rating) }}
{{ runtime($movie->runtime) }}
{{ get_movie_genre($movie->genre) }} @if (get_movie_category($movie->video_type)) {{ get_movie_category($movie->video_type) }} @endif {{ get_movie_quality($movie->video_quality) }}
@endforeach
@endif @if (count($reality_shows))

{{ __('latest_reality_shows') }}

@foreach ($reality_shows as $show)
movie
@if ($show->is_free == 1) @elseif ($show->is_rental == 1)
{{ __('rent:') . ' ' . get_currency($show->rental_price) }}
@else
{{ __('premium') }}
@endif
{{ $show->title }}
{{ date('Y', strtotime($show->release)) }}
@if ($show->rating)
{{ get_rating($show->rating) }}
@endif
{{ runtime($movie->runtime) }}
{{ get_movie_genre($show->genre) }} @if (get_movie_category($show->video_type)) {{ get_movie_category($show->video_type) }} @endif {{ get_movie_quality($show->video_quality) }}
@endforeach
@endif @if (count($feature_tv_channels))

{{ __('featured_tv_channels') }}

@foreach ($feature_tv_channels as $channel) @endforeach
@endif @if (count($latest_tv_series))

{{ __('latest_tv_series') }}

@endif
@php $leftAd = get_ads('home_page_promotional_left', '300x250', 'object'); // Get the full ad object/array @endphp @if ($leftAd)
@if ($leftAd->type == 'google') {{-- Google AdSense code --}}
{!! $leftAd->google_ads_code !!}
@elseif($leftAd->type == 'mp4') {{-- MP4 Video Ad --}} @elseif($leftAd->type == 'local') {{-- Local Image Ad --}} ads @endif
@endif @if (get_config('promo_movie')) @php $promo_movie = get_config('promo_movie'); $movie = App\Models\Movie::where('id', $promo_movie)->first(); @endphp @if ($movie)
@if ($movie->is_free == 1) @elseif ($movie->is_rental == 1)
{{ __('rent:') . ' ' . get_currency($movie->rental_price) }}
@else
{{ __('premium') }}
@endif

{{ $movie->seo_title ?? $movie->title }}

{{ $movie->title }}

@if ($movie->season)

{{ __('season') }} - {{ $movie->season }}

@endif {{ __('watch_now') }}
@endif @endif @php $rightAd = get_ads('home_page_promotional_right', '300x250', 'object'); // Get the full ad object/array @endphp @if ($rightAd)
@if ($rightAd->type == 'google') {{-- Google AdSense code --}}
{!! $rightAd->google_ads_code !!}
@elseif($rightAd->type == 'mp4') {{-- MP4 Video Ad --}} @elseif($rightAd->type == 'local') {{-- Local Image Ad --}} ads @endif
@endif
@if (count($artists) > 0)

{{ __('top_artists') }}

@foreach ($artists as $artist)
artist

{{ $artist->star_name }}

@endforeach
@endif @if (count($recommended_movies) > 0) @endif @if (count($latest_blogs))

{{ __('latest_blog') }}

@foreach ($latest_blogs as $blog)
{{ __('top_news') }}
blog

{{ $blog->title }}

{{ $blog->meta_description }}

@endforeach
@endif @endsection