@extends('layouts.site') @section('title', ($package->name ?? 'Tour Package') . ' - Visit Sri Lanka 360') @php $cover = !empty($package->cover_image) ? asset('storage/' . ltrim($package->cover_image, '/')) : null; $price = $package->price_from ? number_format((float) $package->price_from, 0) : null; $destinations = $package->destinations ?? collect(); $days = $package->days ?? collect(); $gallery = collect($package->gallery_images ?? []); $includes = collect($package->includes ?? []) ->map(fn($x) => is_array($x) ? ($x['text'] ?? null) : $x) ->filter() ->values(); $excludes = collect($package->excludes ?? []) ->map(fn($x) => is_array($x) ? ($x['text'] ?? null) : $x) ->filter() ->values(); $map = $package->map_embed ?? null; $mapIsIframe = is_string($map) && str_contains($map, 'type?->name ?? 'Tour Package'; @endphp @section('content')
{{-- HERO --}}
@if($cover) {{ $package->name }} @else
@endif
{{ $typeName }}

{{ $package->name }}

@if(!empty($package->short_description))

{{ $package->short_description }}

@endif
{{-- SUMMARY BAR --}}
Price
@if($price) {{ $package->currency }} {{ $price }} /{{ $package->price_unit }} @else Contact for price @endif
Duration
{{ (int) $package->duration_days }} Days @if((int) $package->duration_nights > 0) / {{ (int) $package->duration_nights }} Nights @endif
Destinations
{{ $destinations->count() ?: '—' }} places
Travellers
Min {{ (int) $package->min_travellers }}
{{-- BODY --}}
{{-- LEFT --}}
{{-- INFO --}}

Information

Departure Location
{{ $package->departure_location ?: '—' }}
Return Location
{{ $package->return_location ?: '—' }}
@if($destinations->count())
Destinations
@foreach($destinations as $d) {{ $d->name }} @endforeach
@endif
What's included
    @forelse($includes as $i)
  • {{ $i }}
  • @empty
  • @endforelse
Price does not include
    @forelse($excludes as $i)
  • {{ $i }}
  • @empty
  • @endforelse
{{-- TOUR PLAN --}}

Tour Plan

@if($days->count())
@foreach($days as $day) @php $img = !empty($day->image) ? asset('storage/' . ltrim($day->image, '/')) : null; @endphp
Day
{{ (int) $day->day_number }}
{{ $day->title }}
@if(!empty($day->travel_time)) {{ $day->travel_time }} @endif @if(!empty($day->distance_km)) {{ $day->distance_km }} km @endif @if(!empty($day->overnight_text)) Overnight included @endif
@if($img)
Day {{ (int) $day->day_number }}
@endif
@if(!empty($day->travel_time)) {{ $day->travel_time }} @endif @if(!empty($day->distance_km)) {{ $day->distance_km }} km @endif @if(!empty($day->overnight_text)) Overnight @endif
@if(!empty($day->description))
{{ $day->description }}
@endif @if(!empty($day->overnight_text))
Overnight
{{ $day->overnight_text }}
@endif
@endforeach
@else
No day plan added yet.
@endif
{{-- LOCATION --}}

Location

@if($map)
@if($mapIsIframe) {!! $map !!} @else @endif
@else
No map added.
@endif
{{-- GALLERY --}} {{-- ADDITIONAL --}}

Additional Info

{{ $package->additional_info ?? '—' }}
{{-- SIMILAR --}}

Similar Tours

@if(!empty($similar) && $similar->count())
@foreach($similar as $p) @php $img = $p->cover_image ? asset('storage/' . ltrim($p->cover_image, '/')) : 'https://placehold.co/900x600'; @endphp
{{ $p->type?->name ?? 'Tour' }}
{{ $p->name }}
@endforeach
@else
No similar tours found.
@endif
{{-- RIGHT --}}
@push('scripts') @endpush @endsection @push('styles') @endpush