@extends('layouts.customer') @section('content')

My Coins

@php $coinsPercent = $activePlanDetails['percent']; $nextPlanData = getNextVipFeature($activePlanDetails['plan_id']); $maxPlanId = getMaxVipFeature(); $imageName = ''; if($activePlanDetails['plan_id']==$maxPlanId){ $imageName = asset('front/image/platinum.png'); }else if($nextPlanData){ if(isset($nextPlanData->id) && $nextPlanData->id == 1){ $imageName = asset('front/image/silver.png'); }else if(isset($nextPlanData->id) && $nextPlanData->id == 2){ $imageName = asset('front/image/gold.png'); }else if(isset($nextPlanData->id) && $nextPlanData->id >= 3){ $imageName = asset('front/image/platinum.png'); } }else{ $imageName = asset('front/image/silver.png'); } $planDesc = ''; if($maxPlanId==$activePlanDetails['plan_id']){ $planDesc = 'You have reached at highest membership now'; $coinsPercent = '100'; }else if($nextPlanData){ $planDesc = 'Earn '.(((int)$activePlanDetails['remaining_points'])+1).' more coins to reach '.$nextPlanData->name.''; } @endphp

{{ $activePlanDetails['plan_name'] }} You have {{ auth()->user()->getUserWalletPoints() }} {{ config('constants.points_name') }}

@if($imageName!='') @endif
{{ $planDesc }}
{{--

You have

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

{{ config('constants.points_name') }}

--}}
@php $points = auth()->user()->getUserWalletPoints(); if($points > 0 && auth()->user()->coin_expired_at){ $titleText = $points." ".config('constants.points_name')." will expire on ". date('d M Y', strtotime(auth()->user()->coin_expired_at)) ?? ''; $subTitleText = "Make just 1 transaction by the expire date to extend your coins validity"; }else{ $titleText = "You have ".$points." coins."; $subTitleText = "Make a purchase to start earning Clover Coins."; } @endphp
{{ $titleText }}

{{ $subTitleText }}

{{--Learn more--}}
@endsection @section('scripts') @endsection