{{-- ========================================================== ADMIN VIEW ========================================================== --}} @can('create subscription plans')

Subscription Plans

Create and manage subscription plans available to students.

Create Plan
{{-- ====================================================== Flash Message ====================================================== --}} @if(session('success'))
{{ session('success') }}
@endif {{-- ====================================================== Search / Filter ====================================================== --}}
{{-- ====================================================== ADMIN PLANS TABLE ====================================================== --}}
@if($subscriptionPlans->count())
@foreach($subscriptionPlans as $plan) @endforeach
# Plan Duration Amount Status Created Action
{{ $subscriptionPlans->firstItem() + $loop->index }}
{{ $plan->name }}
@if($plan->description) {{ Str::limit($plan->description, 70) }} @endif
{{ $plan->duration_days }} {{ $plan->duration_days == 1 ? 'Day' : 'Days' }} ₦{{ number_format($plan->amount, 2) }} @if($plan->status) Active @else Inactive @endif {{ $plan->created_at?->format('d M Y') }}
{{-- Pagination --}}
{{ $subscriptionPlans->links() }}
@else
No Subscription Plans Found

Create your first subscription plan to get started.

Create Plan
@endif
{{-- ========================================================== STUDENT VIEW ========================================================== --}} @elsecan('subscribe to plans')

Subscription Plans

Choose a subscription plan that works for you.

{{-- ====================================================== Active Subscription Plans ====================================================== --}} @if($subscriptionPlans->count())
@foreach($subscriptionPlans as $plan) @if($plan->status)
{{-- Icon --}}
{{-- Plan Name --}}
{{ $plan->name }}
{{-- Description --}} @if($plan->description)

{{ $plan->description }}

@else

Get access to SmartCBT premium features with this subscription plan.

@endif {{-- Amount --}}
Price

₦{{ number_format($plan->amount, 2) }}

{{-- Duration --}}
{{ $plan->duration_days }} {{ $plan->duration_days == 1 ? 'Day' : 'Days' }}
{{-- Status --}}
Active Plan
{{-- Subscribe Button --}} @can('subscribe to plans') Subscribe Now!!! @endcan
@endif @endforeach
@else {{-- ================================================== No Plans ================================================== --}}
No Subscription Plans Available

There are currently no active subscription plans available.

@endif @else {{-- ====================================================== USER HAS NO SUBSCRIPTION PLAN PERMISSION ====================================================== --}}
Access Restricted

You do not have permission to view subscription plans.

@endcan