@extends('user.layout') @php Config::set('app.timezone', App\Models\BasicSetting::first()->timezone); @endphp @section('styles') @endsection @php $user = Auth::guard('web')->user(); $package = \App\Http\Helpers\UserPermissionHelper::currentPackagePermission($user->id); @endphp @section('content') @if (is_null($package)) @php $pendingMemb = \App\Models\Membership::query() ->where([['user_id', '=', Auth::id()], ['status', 0]]) ->whereYear('start_date', '<>', '9999') ->orderBy('id', 'DESC') ->first(); $pendingPackage = isset($pendingMemb) ? \App\Models\Package::query()->findOrFail($pendingMemb->package_id) : null; @endphp @if ($pendingPackage)
You have requested a package which needs an action (Approval / Rejection) by Admin. You will be notified via mail once an action is taken.
Pending Package: {{ $pendingPackage->title }} {{ $pendingPackage->term }} Decision Pending
@else
Your membership is expired. Please purchase a new package / extend the current package.
@endif @else
@if ($package_count >= 2) @if ($next_membership->status == 0) You have requested a package which needs an action (Approval / Rejection) by Admin. You will be notified via mail once an action is taken.
@elseif ($next_membership->status == 1) You have another package to activate after the current package expires. You cannot purchase / extend any package, until the next package is activated
@endif @endif Current Package: {{ $current_package->title }} {{ $current_package->term }} @if ($current_membership->is_trial == 1) (Expire Date: {{ Carbon\Carbon::parse($current_membership->expire_date)->format('M-d-Y') }}) Trial @else (Expire Date: {{ $current_package->term === 'lifetime' ? 'Lifetime' : Carbon\Carbon::parse($current_membership->expire_date)->format('M-d-Y') }}) @endif @if ($package_count >= 2)
Next Package To Activate: {{ $next_package->title }} {{ $next_package->term }} @if ($current_package->term != 'lifetime' && $current_membership->is_trial != 1) ( Activation Date: {{ Carbon\Carbon::parse($next_membership->start_date)->format('M-d-Y') }}, Expire Date: {{ $next_package->term === 'lifetime' ? 'Lifetime' : Carbon\Carbon::parse($next_membership->expire_date)->format('M-d-Y') }}) @endif @if ($next_membership->status == 0) Decision Pending @endif
@endif
@endif
@foreach ($packages as $key => $package)

{{ $package->title }}

@if (isset($current_package->id) && $current_package->id === $package->id)

{{ __('Current') }}

@endif @if ($package_count >= 2 && $next_package->id == $package->id)

{{ __('Next') }}

@endif
{{ $package->price == 0 ? 'Free' : format_price($package->price) }} /{{ $package->term }}
    @php $features = json_decode($package->features, true); @endphp @if (!empty($features)) @foreach ($features as $feature)
  • {{ $feature }}
  • @endforeach @endif
@php $hasPendingMemb = \App\Http\Helpers\UserPermissionHelper::hasPendingMembership(Auth::id()); @endphp @if ($package_count < 2 && !$hasPendingMemb)
@if (isset($current_package->id) && $current_package->id === $package->id) @if ($package->term != 'lifetime' || $current_membership->is_trial == 1) {{ __('Extend') }} @endif @else {{ __('Buy Now') }} @endif
@endif
@endforeach
@endsection