@extends('layouts.theme') @section('title',__('staticwords.viewall')) @section('main-wrapper')
@php $withlogin= App\Config::findOrFail(1)->withlogin; $auth=Auth::user(); $subscribed = null; if (isset($auth)) { $current_date = date("d/m/y"); $auth = Illuminate\Support\Facades\Auth::user(); if ($auth->is_admin == 1) { $subscribed = 1; } else if ($auth->stripe_id != null) { Stripe\Stripe::setApiKey(env('STRIPE_SECRET')); if(isset($invoices) && $invoices != null && count($invoices->data) > 0) { $user_plan_end_date = date("d/m/y", $invoice->lines->data[0]->period->end); $plans = App\Package::all(); foreach ($plans as $key => $plan) { if ($auth->subscriptions($plan->plan_id)) { if($current_date <= $user_plan_end_date) { $subscribed = 1; } } } } } else if (isset($auth->paypal_subscriptions)) { //Check Paypal Subscription of user $last_payment = $auth->paypal_subscriptions->last(); if (isset($last_payment) && $last_payment->status == 1) { //check last date to current date $current_date = Illuminate\Support\Carbon::now(); if (date($current_date) <= date($last_payment->subscription_to)) { $subscribed = 1; } } } } @endphp @if (isset($movies) && count($movies) > 0 )
{{__('staticwords.viewall')}}
@if(isset($movies)) @foreach($movies as $item) @if($auth && $subscribed!=1) @php if ($item['type'] == 'M') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $item->id], ])->first(); } if ($item['type'] == 'S') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $item->id], ])->first(); } @endphp @endif @if($item['type'] == "M")
@if(isset($protip) && $protip == 1)
{{$item->title}}
{{__('staticwords.rating')}} {{$item->rating}}
  • {{$item->duration}} {{__('staticwords.mins')}}
  • {{$item->publish_year}}
  • {{$item->maturity_rating}}
  • @if($item->subtitle == 1)
  • {{__('staticwords.subtitles')}}
  • @endif

{{str_limit($item->detail,150,'...')}}

@if($auth && $subscribed == 1) {{__('staticwords.readmore')}} @else {{__('staticwords.readmore')}} @endif
@if($subscribed==1 && $auth) @if($item->maturity_rating == 'all age' || $age>=str_replace('+', '', $item->maturity_rating)) @if($item->video_link['iframeurl'] != null) {{__('staticwords.playnow')}} @else {{__('staticwords.playnow')}} @endif @else {{__('staticwords.playnow')}} @endif @if($item->trailer_url != null || $item->trailer_url != '') {{__('staticwords.watchtrailer')}} @endif @else @if($item->trailer_url != null || $item->trailer_url != '') {{__('staticwords.watchtrailer')}} @endif @endif @if($catlog ==0 && $subscribed ==1) @if (isset($wishlist_check->added)) {{$wishlist_check->added == 1 ? __('staticwords.removefromwatchlist') : __('staticwords.addtowatchlist')}} @else {{__('staticwords.addtowatchlist')}} @endif @elseif($catlog == 1 && $auth) @if (isset($wishlist_check->added)) {{$wishlist_check->added == 1 ? __('staticwords.removefromwatchlist') : __('staticwords.addtowatchlist')}} @else {{__('staticwords.addtowatchlist')}} @endif @endif
@endif
@elseif($item['type'] == "S")
@if(isset($protip) && $protip == 1)
{{$item->tvseries->title}}
{{__('staticwords.tmdbrating')}} {{$item->tvseries->rating}}
  • {{__('staticwords.season')}} {{$item->season_no}}
  • {{$item->publish_year}}
  • {{$item->tvseries->age_req}}
  • @if($item->subtitle == 1)
  • {{__('staticwords.subtitles')}}
  • @endif
@if ($item->detail != null || $item->detail != '')

{{str_limit($item->detail,150,'...')}}

@else

{{str_limit($item->tvseries->detail,150,'...')}}

@endif @if($auth && $subscribed == 1) {{__('staticwords.readmore')}} @else {{__('staticwords.readmore')}} @endif
@if($subscribed==1 && $auth) @if (isset($item->episodes[0])) @if($item->tvseries['age_req']== 'all age' || $age>=str_replace('+', '', $item->tvseries['age_req'])) @if($item->episodes[0]->video_link['iframeurl'] !="") {{__('staticwords.playnow')}} @else {{__('staticwords.playnow')}} @endif @else {{__('staticwords.playnow')}} @endif @endif @if($item->trailer_url != null || $item->trailer_url != '') {{__('staticwords.watchtrailer')}} @endif @else @if($item->trailer_url != null || $item->trailer_url != '') {{__('staticwords.watchtrailer')}} @endif @endif @if($catlog == 0 && $subscribed ==1) @if (isset($wishlist_check->added)) {{$wishlist_check->added == 1 ? __('staticwords.removefromwatchlist') : __('staticwords.addtowatchlist')}} @else {{__('staticwords.addtowatchlist')}} @endif @elseif($catlog ==1 && $auth) @if (isset($wishlist_check->added)) {{$wishlist_check->added == 1 ? __('staticwords.removefromwatchlist') : __('staticwords.addtowatchlist')}} @else {{__('staticwords.addtowatchlist')}} @endif @endif
@endif
@endif @endforeach @endif
{!! $movies->links() !!}
@endif @endsection @section('custom-script') @endsection