@extends('layouts.theme') @section('title','User Dashboard') @section('main-wrapper') @php $bfree = null; $config=App\Config::first(); $auth=Auth::user(); if ($auth->is_admin==1) { $bfree=1; }else{ $ps=App\PaypalSubscription::where('user_id',$auth->id)->orderBy('id','DESC')->first(); if (isset($ps)) { $current_date = Illuminate\Support\Carbon::now(); if (date($current_date) <= date($ps->subscription_to)) { if ($ps->package_id==100 || $ps->package_id == 0) { $bfree=1; }else{ $bfree=0; } } } } @endphp
@if(isset($auth->image) && $auth->image != NULL) @else @endif

{{auth()->user()->name}}

{{auth()->user()->email}}
@if($auth->is_admin==1)
{{__('Subscribed to')}} : {{__('FREE')}}
@else @if($bfree==1 && $ps->method == 'free')
{{__('Subscribed to')}} : {{__('Trail')}}
{{__('Subscription valid till')}} : {{date('M j, Y g:i a',strtotime($ps->subscription_to))}}
@elseif($bfree==0) @if(isset($ps) && $current_subscription != NULL && $current_subscription->subscription_to < $ps->subscription_to) @php $psn=App\Package::where('id',$ps->package_id)->first(); @endphp
{{__('Subscribed to')}} : {{$psn != NULL ? ucfirst($psn['name']) : '-'}}
{{__('Subscription valid till')}} : {{date('M j, Y g:i a',strtotime($psn->subscription_to))}}
@else @if($current_subscription != null)
{{__('Subscribed to')}} : {{$method == 'stripe' ? ucfirst($current_subscription->name) : ucfirst($current_subscription->plan->name)}}
{{__('Subscription valid till')}} : {{date('M j, Y g:i a',strtotime($current_subscription->subscription_to))}}
@endif @endif @else @if($current_subscription != null)
{{__('Subscribed to')}} : {{$method == 'stripe' ? ucfirst($current_subscription->name) : ucfirst($current_subscription->plan->name)}}
{{__('Subscription valid till')}} : {{date('M j, Y g:i a',strtotime($current_subscription->subscription_to))}}
@endif @endif @endif @if($current_subscription != null && $method == 'stripe') @if(getPlan() == 0) {{__('Resume Subscription')}} @else {{__('Cancel Subscription')}} @endif @elseif($current_subscription != null && $method == 'paypal') @if($current_subscription->status == 0) {{__('Resume Subscription')}} @elseif ($current_subscription->status == 1) {{__('Cancel Subscription')}} @endif @else @if($auth->is_admin != 1) {{__('Subscribe Now')}} @endif @endif
@csrf
@php $nav=App\Menu::orderBy('position','ASC')->get(); @endphp

{{__('Change Email')}}

{{__('Current Email')}}: {{auth()->user()->email}}
@csrf
{{ $errors->first('new_email') }}
{{ $errors->first('current_password') }}

{{__('Change Password')}}

{{__('Want to change your Password')}}
@csrf
{{ $errors->first('current_password') }}
{{ $errors->first('new_password') }}

{{__('Update Age and Mobile Number')}}

{{__('Want to change Age and Mobile Number')}}
@csrf
age)) value="{{Auth::user()->age}}" @endif > {{ $errors->first('age') }}
mobile)) value="{{Auth::user()->mobile}}"@endif> {{ $errors->first('mobile') }}

{{__('Other Settings')}}

{!! Form::open(['method' => 'POST', 'action' => 'UserAccountController@update_otherprofilesetting']) !!}
{!! Form::label('facebook_url',__('Facebook URL')) !!} {!! Form::text('facebook_url', isset(auth()->user()->facebook_url) && auth()->user()->facebook_url != NULL ? auth()->user()->facebook_url : NULL, ['class' => 'form-control']) !!} {{ $errors->first('facebook_url') }}
{!! Form::label('youtube_url', __('Youtube URL')) !!} {!! Form::text('youtube_url',isset(auth()->user()->youtube_url) && auth()->user()->youtube_url != NULL ? auth()->user()->youtube_url : NULL, ['class' => 'form-control']) !!} {{ $errors->first('youtube_url') }}
{!! Form::label('twitter_url', __('Twitter URL')) !!} {!! Form::text('twitter_url',isset(auth()->user()->twitter_url) && auth()->user()->twitter_url != NULL ? auth()->user()->twitter_url : NULL, ['class' => 'form-control']) !!} {{ $errors->first('twitter_url') }}
{!! Form::submit(__('Update'), ['class' => 'btn btn-success']) !!}
{!! Form::close() !!}

{{__('Update Address')}}

{{__('Want to change Address Country State and City')}}
@csrf
{{ $errors->first('address') }}
{{--

- Please enter your Country

--}} {{ $errors->first('country') }}
{{--

- Please enter your State

--}} {{ $errors->first('state') }}
{{--

- Please enter your City

--}} {{ $errors->first('city') }}
@if(isset($invoices) && $invoices != null)

{{__('Stripe billing History')}}

{{-- @dd($invoices); --}} @foreach($invoices as $invoice) {{-- @dd($invoice->created); --}} @php $from = Carbon\Carbon::parse($invoice->subscription_from); $from = $from->toDateString(); $to = Carbon\Carbon::parse($invoice->subscription_to); $to = $to->toDateString(); $created = Carbon\Carbon::parse($invoice->subscription_from); $created = $created->toDateString(); $plan = App\Package::where('plan_id',$invoice->stripe_plan)->first(); @endphp @endforeach
{{__('Date')}} {{__('Package')}} {{__('Service Period')}} {{__('Payment Method')}} {{__('Total')}} {{__('Actions')}}
{{$created}} {{$plan->name}} {{$from}} to {{$to}} Stripe {{$invoice->amount}} ({{ currency($invoice->amount, $from = $plan->currency, $to = Session::has('current_currency') ? ucfirst(Session::get('current_currency')) : $plan->currency, $format = true) }} {{__('equivalent to your currency')}})
@endif @if (isset($paypal_subscriptions) && $paypal_subscriptions != null && count($paypal_subscriptions) > 0)

{{__('billinghistory')}}

@foreach ($paypal_subscriptions as $item) @php $from = Carbon\Carbon::parse($item->subscription_from); $from = $from->toDateString(); $to = Carbon\Carbon::parse($item->subscription_to); $to = $to->toDateString(); @endphp @endforeach
{{__('Date')}} {{__('Package')}} {{__('Service Period')}} {{__('Payment Method')}} {{__('Total')}} {{__('Actions')}}
{{$item->created_at->toDateString()}} {{$item->plan ? $item->plan->name : 'N/A'}} {{$from}} to {{$to}} {{ucfirst($item->method)}} {{$item->price}} {{__('Invoice')}}
@endif
{{ __("How it works ?") }}

{{ __('Affiliate Dashboard') }}


{{__("Start refering your friends and start earning !!")}}


{{__("This is your unique refer link share with your friends and family and start earning !")}}

{{ __("Copy Link") }}
@if($aff_history->count())

{{ __('Total earning') }} {{ $earning }}

{{ __('Affiliate history') }}


@foreach($aff_history as $history)
{{ __('+') }} {{ sprintf("%.2f",$history->amount,2) }} {{ $history->log }} @if($history->procces == 0) ({{ __("Pending") }}) @else ({{ __("Credited to Wallet") }}) @endif

@endforeach @endif @if(isset($aff_history))
{!! $aff_history->links() !!}
@endif
@endsection @section('custom-script') @endsection