@extends('layouts.theme') @section('title','User Dashboard') @section('main-wrapper')
@if(isset($auth->image) && $auth->image != NULL) @else @endif

Change Email

{{__('staticwords.currentemail')}}: {{auth()->user()->email}}
@csrf
{{ $errors->first('new_email') }}
{{ $errors->first('current_password') }}

{{__('staticwords.changepassword')}}

{{__('staticwords.wanttochangeyourpassword')}}
@csrf
{{ $errors->first('current_password') }}
{{ $errors->first('new_password') }}

{{__('staticwords.updateageandmobile')}}

{{__('staticwords.wanttochangeageandmobile')}}
@csrf
dob)) value="{{Auth::user()->dob}}" @endif > {{ $errors->first('dob') }}
mobile)) value="{{Auth::user()->mobile}}"@endif> {{ $errors->first('mobile') }}

{{__('staticwords.yourmembership')}}

{{__('staticwords.wanttochangemembership')}}
@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)->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($auth->is_admin==1)
Current Subscription: FREE
@else @if($bfree==1)
{{__('staticwords.currentsubscritptionfreetill')}} {{date('F j, Y g:i:a',strtotime($ps->subscription_to))}}
@elseif($bfree==0) @if(isset($ps) && $current_subscription->subscription_to < $ps->subscription_to) @php $psn=App\Package::where('id',$ps->package_id)->first(); @endphp
{{__('staticwords.currentsubscription')}}: {{$psn != NULL ? ucfirst($psn['name']) : '-'}}
@else @if($current_subscription != null)
{{__('staticwords.currentsubscription')}}: {{$method == 'stripe' ? ucfirst($current_subscription->name) : ucfirst($current_subscription->plan->name)}}
@endif @endif @else @if($current_subscription != null)
{{__('staticwords.currentsubscription')}}: {{$method == 'stripe' ? ucfirst($current_subscription->name) : ucfirst($current_subscription->plan->name)}}
@endif @endif @endif
@if($current_subscription != null && $method == 'stripe') @if(getPlan() == 0) {{__('staticwords.resumesubscription')}} @else {{__('staticwords.cancelsubscription')}} @endif @elseif($current_subscription != null && $method == 'paypal') @if($current_subscription->status == 0) {{__('staticwords.resumesubscription')}} @elseif ($current_subscription->status == 1) {{__('staticwords.cancelsubscription')}} @endif @else @if($auth->is_admin == 1) @else {{__('staticwords.subscribenow')}} @endif @endif {{--
--}}
@if(isset($invoices) && $invoices != null)

{{__('staticwords.stripebillinghistory')}}

{{-- @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
{{__('staticwords.date')}} {{__('staticwords.package')}} {{__('staticwords.serviceperiod')}} {{__('staticwords.paymentmethod')}} {{__('staticwords.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)

{{__('staticwords.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
{{__('staticwords.date')}} {{__('staticwords.package')}} {{__('staticwords.serviceperiod')}} {{__('staticwords.paymentmethod')}} {{__('staticwords.total')}} {{__('Actions')}}
{{$item->created_at->toDateString()}} {{$item->plan ? $item->plan->name : 'N/A'}} {{$from}} to {{$to}} {{ucfirst($item->method)}} {{$item->price}} ({{ currency($item->price, $from = $item->plan->currency, $to = Session::has('current_currency') ? ucfirst(Session::get('current_currency')) : $item->plan->currency, $format = true) }} {{__('equivalent to your currency')}}) {{__('Invoice')}}
@endif
@endsection