@foreach($package->courses->take(3) as $course)
{{ $course->name }}
@endforeach
@if($package->courses->count() > 3)
+{{ $package->courses->count() - 3 }} more courses
@endif
@if($package->duration)
{{ $package->duration }}
@endif
@if($package->level)
{{ $package->level }}
@endif
@if($package->certificate_included)
{{ $package->certificate_included }}
@endif
@if(count($keyPoints) > 0)
@foreach($keyPoints as $point)
@php
// Clean the text
$cleanText = $point;
$icon = '✓'; // Default CSS tick
$iconClass = 'tick';
// Check if the point contains ✅ or ❌ emoji
$hasCheck = strpos($point, '✅') !== false;
$hasCross = strpos($point, '❌') !== false;
$hasCheckAlt = strpos($point, '✔') !== false || strpos($point, '✓') !== false;
$hasCrossAlt = strpos($point, '✖') !== false || strpos($point, '✗') !== false;
if ($hasCheck || $hasCheckAlt) {
$icon = '✓';
$iconClass = 'positive';
$cleanText = trim(str_replace(['✅', '✔', '✓'], '', $point));
} elseif ($hasCross || $hasCrossAlt) {
$icon = '✕';
$iconClass = 'negative';
$cleanText = trim(str_replace(['❌', '✖', '✗'], '', $point));
} else {
// No emoji found, detect from content
$lowerPoint = strtolower($point);
if (strpos($lowerPoint, 'free') !== false ||
strpos($lowerPoint, 'included') !== false ||
strpos($lowerPoint, 'support') !== false ||
strpos($lowerPoint, 'yes') !== false ||
strpos($lowerPoint, 'same day') !== false) {
$icon = '✓';
$iconClass = 'positive';
} elseif (strpos($lowerPoint, 'no ') !== false ||
strpos($lowerPoint, 'not ') !== false ||
strpos($lowerPoint, 'hidden') !== false) {
$icon = '✕';
$iconClass = 'negative';
} else {
$icon = '✓';
$iconClass = 'tick';
}
$cleanText = $point;
}
// Final cleanup
$cleanText = trim($cleanText);
if (empty($cleanText)) {
$cleanText = $point;
}
@endphp
-
{{ $icon }}
{{ $cleanText }}
@endforeach
@endif