@php
$icons = [
'bi-speedometer2',
'bi-lightning-charge-fill',
'bi-rocket-takeoff-fill',
'bi-cpu',
'bi-router',
'bi-wifi',
'bi-globe',
'bi-activity',
'bi-ethernet',
'bi-cloud-arrow-down-fill'
];
$iconIndex = abs(crc32($package->package ?? '')) % count($icons);
$selectedIcon = $icons[$iconIndex];
// Speed fallback detection logic
$speed = $package->speed;
if (empty($speed)) {
if (preg_match('/_(\d+)M$/i', $package->package, $matches)) {
$speed = $matches[1] . ' Mbps';
} elseif (is_numeric($package->description)) {
$speed = $package->description . ' Mbps';
} else {
$speed = 'Standard';
}
}
// Clean category name for badge
$cleanCat = 'Standard';
if ($package->plan_label && strtolower($package->plan_label) !== 'standard') {
if (str_contains($package->plan_label, '-')) {
$cleanCat = explode('-', $package->plan_label)[0];
} else {
$cleanCat = $package->plan_label;
}
}
$cleanCat = trim($cleanCat);
@endphp
{{ $speed }}
@forelse($package->features ?? [] as $feature)
-
{{ $feature['value'] ?? $feature }}
@empty
- 24 HOURS UNLIMITED
- Fiber Optics Support
- 24/7 Priority Support
@endforelse
{{ number_format($package->price) }}৳ /MONTH