@php
$categoryId = $key;
$isText = 0;
@endphp
@php
$subscription =
\App\Models\SubscriptionPlan::checkAlreadyPurchased($categoryId,
$advertisment->id);
@endphp
@if (!empty($subscription))
@foreach (\App\Models\SubscriptionPlan::getCategoryPlan($key) as
$plan)
@continue($isText)
{{ __('words.Already purchased') }}
@if ($subscription->status ==
\App\Models\Subscription::STATUS_PENDING)
Status : Pending
@elseif ($subscription->status ==
\App\Models\Subscription::STATUS_UNDERPAYMENT)
Status : Underpayment
@elseif ($subscription->status ==
\App\Models\Subscription::STATUS_OVERPAYMENT)
Status : Overpayment
@else
{{ __('words.Promotion Schedule') }}
@php
$userObj = auth()->user();
$timezone = $userObj->getTimezone();
$startdate = Carbon\Carbon::createFromFormat('Y-m-d H:i:s',
$subscription->created_at, 'UTC');
$startdate->setTimezone($timezone);
@endphp
{{ __('words.Starting Date') }} :
{{ date('M-d-Y/ H:i:s', strtotime($startdate)) }}
@php
$days = $subscription->plan->days;
$endDated = Date('Y-m-d H:i:s',
strtotime($subscription->created_at . "+ $days days"));
$endDates = Carbon\Carbon::createFromFormat('Y-m-d H:i:s',
$endDated, 'UTC');
$endDates->setTimezone($timezone);
@endphp
{{ __('words.End Date') }} :
{{ date('M-d-Y/ H:i:s', strtotime($endDates)) }}
@endif
@php
$isText = 1;
@endphp
@endforeach
{{--
--}}
@else
@foreach (\App\Models\SubscriptionPlan::getCategoryPlan($key) as $plan)
{{-- @php
$plan->createPlanOnQuickBook($amount,$category,$key)
@endphp --}}
@endforeach
@endif
@php
$lastRecord = getLastCategoryByAdId($advertisment->id);
$sexualCategoryIds =\App\Models\Category::where('slug', 'sexual_care')
->pluck('id')
->all();
@endphp