@extends('layouts.app') @section('title', 'Course Packages - Stars Education & Training') @push('page-styles') @endpush @section('content')

Course Packages

Save money by bundling multiple courses together. Choose the package that suits your career goals.

@if($packages->count() > 0)
@foreach($packages as $package) @php // ============================================ // USE DIRECT DATABASE VALUES // ============================================ $actualPrice = (float) $package->price; // DIRECTLY use the stored discounted_price from database $discountedPrice = (float) $package->discounted_price; // If discounted_price is NULL or 0, use the actual price if ($discountedPrice <= 0) { $discountedPrice = $actualPrice; } $savings = $actualPrice - $discountedPrice; // Calculate discount percentage from stored values (for display only) $discountPercent = 0; if ($actualPrice > 0 && $discountedPrice > 0 && $discountedPrice < $actualPrice) { $discountPercent = round((($actualPrice - $discountedPrice) / $actualPrice) * 100); } $keyPoints = $package->key_points; @endphp
@endforeach
@else

No Packages Available

Check back soon for exciting course packages.

@endif
@push('page-scripts') @endpush @endsection