@php $cards = collect($packages ?? [])->map(function ($p) { $img = $p->cover_image ? asset('storage/' . ltrim($p->cover_image, '/')) : asset('assets/img/hero/tours-hero.jpg'); $price = $p->price_from ? $p->currency . ' ' . number_format((float) $p->price_from, 0) : 'Contact'; $small = $p->type?->name ?? 'Tour Package'; $title = $p->destinations && $p->destinations->count() ? $p->destinations->pluck('name')->take(2)->implode(', ') : $p->name; return [ 'price' => $price, 'small' => $small, 'title' => $title, 'img' => $img, 'href' => route('tours.show', $p->slug), 'name' => $p->name, ]; })->values(); $desktopCards = $cards->take(10); $mobileCards = $cards->take(5); $row1 = $desktopCards->slice(0, 5); $row2 = $desktopCards->slice(5, 5); @endphp @if($cards->count())
{{-- Heading --}}
Modern & Beautiful

Explore the World for Yourself

Discover curated Sri Lanka journeys - beaches, hill country, culture, wildlife and premium escapes.

{{-- MOBILE: show only 5 --}}
@foreach($mobileCards as $c)
{{ $c['price'] }}
{{ $c['small'] }}
{{ $c['title'] }}
@endforeach
{{-- DESKTOP: show 10 --}} {{-- View All button --}}
@endif