@extends('layouts.landing') @section('title', 'Subscription') @section('content')
Your subscription is active Expires on {{ \Carbon\Carbon::parse($user->expiry_date)->toFormattedDateString() }}
Your subscription has not been activated
Your subscription has expired, on {{ \Carbon\Carbon::parse(Auth::user()->expiry_date)->toFormattedDateString() }}
Renew planYou don't have an active plan
Subscribe to a plans/n | Payment Reference | Amount | Package | Payment Status | Payment Date | Package Expiry Date | |
---|---|---|---|---|---|---|---|
{{ $transaction_no }} | @php $transaction_no++; @endphp{{ $transaction->reference }} | ₦{{ number_format($transaction->amount, 2) }} | @php $package = App\Models\Package::where('id', $transaction->payment_reference_id)->first(); $donation = App\Models\Donation::where('id', $transaction->payment_reference_id)->first(); @endphp@if ($transaction->payment_type == 'subscription') {{ $package->name }} @else {{ $donation->title }} @endif | {{ $transaction->status }} | {{ \Carbon\Carbon::parse($transaction->created_at)->toFormattedDateString() }} | @php $package_expiry = App\Models\Package::where('id', $transaction->payment_reference_id)->first(); if ($package_expiry) { if ($package_expiry->validity == 'Days') { $date = $package_expiry->duration; $transaction_date = \Carbon\Carbon::parse($transaction->created_at)->toFormattedDateString(); $get_date = strtotime($transaction_date); $added_date = strtotime("+$date day", $get_date); $expiry_date = date('M d, Y', $added_date); } if ($package_expiry->validity == 'Months') { $date = $package_expiry->duration; $transaction_date = \Carbon\Carbon::parse($transaction->created_at)->toFormattedDateString(); $get_date = strtotime($transaction_date); $added_date = strtotime("+$date month", $get_date); $expiry_date = date('M d, Y', $added_date); } if ($package_expiry->validity == 'Years') { $date = $package_expiry->duration; $transaction_date = \Carbon\Carbon::parse($transaction->created_at)->toFormattedDateString(); $get_date = strtotime($transaction_date); $added_date = strtotime("+$date year", $get_date); $expiry_date = date('M d, Y', $added_date); } } @endphp @if ($transaction->status == 'paid')@if ($transaction->payment_type == 'subscription') {{ @$expiry_date }} @else -- @endif | @else-- | @endif