@extends('layouts.theme') @section('title',__('staticwords.watchhistory')) @section('main-wrapper')
@php $withlogin= App\Config::findOrFail(1)->withlogin; $catlog= App\Config::findOrFail(1)->catlog; $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 || $auth->is_assistant == 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($pusheditems) && count($pusheditems) > 0 )
{{__('staticwords.watchhistory')}}
@if(isset($pusheditems)) @foreach($pusheditems as $item) @if($auth && getSubscription()->getData()->subscribed == true) @php if (isset($item->type) && $item->type == 'M') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $item->id], ])->first(); } if (isset($item->type) && $item->type == 'S') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $item->id], ])->first(); } @endphp @endif @if(isset($item->type) && $item->type == "M") @if($item->status == 1) @php $is_play = 0; if(getSubscription()->getData()->subscribed == true){ foreach($item->menus as $moviemenu){ if(array_search($moviemenu->menu_id, array_column(getSubscription()->getData()->nav_menus, 'id')) !== false) { $is_play = 1; } } } @endphp
@if($item->thumbnail != null || $item->thumbnail != '') genre-image @else genre-image @endif @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @else @if(isset($item->is_upcoming) && $item->is_upcoming == 1) Upcoming @endif @endif
{!! Form::open(['method' => 'DELETE', 'action' => ['WatchController@moviedestroy', $item->id]]) !!} {{-- {!! Form::submit(__('staticwords.remove'), ["class" => "btn btn-danger"]) !!} --}}
{!! Form::close() !!} @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

{{$item->detail}}

{{__('staticwords.readmore')}}
@if($auth && getSubscription()->getData()->subscribed == true) @if($item->is_upcoming != 1) @if(checkInMovie($item) == true) @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 @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 && getSubscription()->getData()->subscribed == true) @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 @elseif(isset($item->type) && $item->type == "S") @if($item->tvseries->status == 1)
@if($item->tvseries->thumbnail != null || $item->tvseries->thumbnail != '') genre-image @else genre-image @endif @if($item->tvseries->is_custom_label == 1) @if(isset($item->tvseries->label_id)) {{$item->tvseries->label->name}} @endif @endif
{!! Form::open(['method' => 'DELETE', 'action' => ['WatchController@showdestroy', $item->tvseries->id]]) !!} {{-- {!! Form::submit(__('staticwords.remove'), ["class" => "btn btn-danger"]) !!} --}}
{!! Form::close() !!} @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 != '')

{{$item->detail}}

@else

{{$item->tvseries->detail}}

@endif
@if($auth && getSubscription()->getData()->subscribed == true) @if(isset($item->episodes[0]) && checkInTvseries($item->tvseries) == true) @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 && getSubscription()->getData()->subscribed == true) @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 @endif @endforeach @endif
{!! $pusheditems->links() !!}
@endif @endsection @section('custom-script') @endsection