@extends('layouts.theme') @section('title',"Search result for $searchKey") @section('main-wrapper') @php $age=0; if ($configs->age_restriction==1) { if(Auth::user()){ $user_id=Auth::user()->id; $user=App\User::findOrfail($user_id); $age=$user->age; } }else{ $age=100; } $withlogin= $configs->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 || $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($filter_video)) @if(count($filter_video) > 0)
@if(isset($actor))
@if(!is_null($actor->image)) genre-image @else genre-image @endif
{{$actor->name}}

{{__('staticwords.dob')}}- {{$actor->DOB}}

{{__('staticwords.placeofbirth')}}- {{$actor->place_of_birth}}

{{$actor->biography}}

{{count($filter_video)}} {{__('staticwords.foundfor')}} "{{$searchKey}}"
@endif @if(isset($director))
@if(!is_null($director->image)) Director-image @else genre-image @endif
{{$director->name}}

{{__('staticwords.dob')}}- {{$director->DOB}}

{{__('staticwords.placeofbirth')}}- {{$director->place_of_birth}}

{{$director->biography}}

{{count($filter_video)}} {{__('staticwords.foundfor')}} "{{$searchKey}}"
@endif @foreach($filter_video->unique('id') as $key => $item) @php if($auth){ if ($item->type == 'M') { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['movie_id', '=', $item->id], ])->first(); } else { $wishlist_check = \Illuminate\Support\Facades\DB::table('wishlists')->where([ ['user_id', '=', $auth->id], ['season_id', '=', $item->id], ])->first(); } } @endphp
@if($item->type == 'M' && $item->thumbnail != null) genre-image @if($item->is_custom_label == 1) @if(isset($item->label_id)) {{$item->label->name}} @endif @endif @elseif($item->type == 'M' && $item->thumbnail == null) genre-image @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 @elseif($item->type == 'S') @if($item->thumbnail != null) genre-image @if($item->tvseries->is_custom_label == 1) @if(isset($item->tvseries->label_id)) {{$item->tvseries->label->name}} @endif @endif @elseif($item->tvseries->thumbnail != null) genre-image @if($item->tvseries->is_custom_label == 1) @if(isset($item->tvseries->label_id)) {{$item->tvseries->label->name}} @endif @endif @else genre-image @if($item->tvseries->is_custom_label == 1) @if(isset($item->tvseries->label_id)) {{$item->tvseries->label->name}} @endif @endif @endif @endif
@if($item->type == 'M') @if($auth && $subscribed == 1) {{$item->title}} @else {{$item->title}} @endif @elseif($item->type == 'S') @if($auth && $subscribed == 1) {{$item->tvseries->title}} @else {{$item->tvseries->title}} @endif @endif
  • @if($item->type == 'M') {{$item->duration}} {{__('staticwords.mins')}} @else {{__('staticwords.season')}} {{$item->season_no}} @endif

@if($item->type == 'M') {{str_limit($item->detail, 360)}} @if($auth && $subscribed == 1) {{__('staticwords.readmore')}} @else {{__('staticwords.readmore')}} @endif @else @if ($item->detail != null || $item->detail != '') {{str_limit($item->detail, 360)}} @if($auth && $subscribed == 1) {{__('staticwords.readmore')}} @else {{__('staticwords.readmore')}} @endif @else {{str_limit($item->tvseries->detail, 360)}} @if($auth && $subscribed == 1) {{__('staticwords.readmore')}} @else {{__('staticwords.readmore')}} @endif @endif @endif

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