lots of progress
This commit is contained in:
@@ -1,18 +1,92 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
||||
{{ __('Subscriptions') }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
@extends('layouts.app')
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||
<div class="p-6 text-gray-900">
|
||||
<h3 class="text-lg font-medium mb-4">Available Subscriptions</h3>
|
||||
<p class="text-gray-600">This page will display available subscription plans. Content coming soon.</p>
|
||||
@section('content')
|
||||
<div class="container py-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-10">
|
||||
<div class="text-center mb-5">
|
||||
<h1 class="h2 mb-3">Choose Your Subscription Plan</h1>
|
||||
<p class="text-muted">Select the plan that best fits your needs</p>
|
||||
</div>
|
||||
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
{{ session('error') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($userSubscription)
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<h5 class="card-title mb-1">Current Subscription: {{ $userSubscription->subscription->name }}</h5>
|
||||
<p class="card-text text-muted mb-0">
|
||||
Expires: {{ $userSubscription->expires_at->format('F j, Y') }}
|
||||
</p>
|
||||
</div>
|
||||
<form action="{{ route('subscriptions.cancel', $userSubscription) }}" method="POST" class="d-inline">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-outline-danger" onclick="return confirm('Are you sure you want to cancel your subscription?')">
|
||||
Cancel Subscription
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row g-4">
|
||||
@foreach($subscriptions as $subscription)
|
||||
<div class="col-md-4">
|
||||
<div class="card h-100 {{ $subscription->name === 'Pro' ? 'border-primary' : '' }}">
|
||||
@if($subscription->name === 'Pro')
|
||||
<div class="card-header bg-primary text-white text-center">
|
||||
<span class="badge bg-white text-primary">Most Popular</span>
|
||||
</div>
|
||||
@endif
|
||||
<div class="card-body">
|
||||
<h3 class="card-title text-center mb-4">{{ $subscription->name }}</h3>
|
||||
<div class="text-center mb-4">
|
||||
<span class="display-4">${{ number_format($subscription->price, 2) }}</span>
|
||||
<span class="text-muted">/month</span>
|
||||
</div>
|
||||
<p class="card-text text-center mb-4">{{ $subscription->description }}</p>
|
||||
<ul class="list-unstyled mb-4">
|
||||
@foreach($subscription->features as $feature)
|
||||
<li class="mb-2">
|
||||
<i class="bi bi-check-circle-fill text-success me-2"></i>
|
||||
{{ $feature }}
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<div class="text-center">
|
||||
@if($userSubscription && $userSubscription->subscription_id === $subscription->id)
|
||||
<button class="btn btn-outline-primary" disabled>Current Plan</button>
|
||||
@else
|
||||
<form action="{{ route('subscriptions.subscribe', $subscription) }}" method="POST">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Subscribe Now
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user