@extends('admin.layouts.app') @section('title', 'Package Details') @section('content')
Package Details
Edit Back
ID #{{ $package->package_id }}
Name {{ $package->name }}
Slug {{ $package->slug }}
Description {{ $package->description ?? 'No description' }}
Price £{{ number_format($package->price, 2) }}
Discounted Price @php $displayPrice = $package->discounted_price ?? $package->getDiscountedPrice(); @endphp £{{ number_format($displayPrice, 2) }} @if($package->discounted_price && $package->discounted_price > 0) STORED VALUE @else CALCULATED FROM DISCOUNT @endif
Discount @if($package->discount > 0) {{ $package->discount }}% Discounted Price: £{{ number_format($package->getDiscountedPrice(), 2) }} @else 0% @endif
Position {{ $package->position }}
Featured @if($package->is_featured) Featured @else No @endif
Duration {{ $package->duration ?? 'N/A' }}
Level {{ $package->level ?? 'N/A' }}
Certificate Included {{ $package->certificate_included ?? 'N/A' }}
Created {{ $package->created_at->format('d/m/Y H:i:s') }}
Last Updated {{ $package->updated_at->format('d/m/Y H:i:s') }}
Courses Included
@if($package->courses->count() > 0)
    @foreach($package->courses as $course)
  • {{ $course->name }} (£{{ number_format($course->getDiscountedPrice(), 2) }})
  • @endforeach
Total Original Price: {{ $package->getFormattedTotalOriginalPriceAttribute() }}
Package Price: {{ $package->getFormattedDiscountedPriceAttribute() }}
You Save: {{ $package->getFormattedSavingsAttribute() }} ({{ $package->getSavingsPercentageAttribute() }}%)
@else
No courses assigned to this package.
@endif
Package Image
@if($package->image && file_exists(public_path('uploads/packages/' . $package->image))) {{ $package->name }} @else

No image uploaded

@endif
@endsection