@extends('layouts.app') @section('title', 'Book ' . $activity->name . ' — Mzaar Mountain Resort') @push('head') @endpush @section('content') @php $minDur = $activity->min_duration_minutes ?? 60; $incDur = $activity->duration_increment_minutes ?? 30; $maxDur = max($minDur * 4, 240); // up to 4× min or 4 hours // Build duration options $durOptions = []; for ($d = $minDur; $d <= $maxDur; $d += $incDur) { $h = intdiv($d, 60); $m = $d % 60; $label = $h > 0 ? ($h . 'h' . ($m > 0 ? ' ' . $m . 'min' : '')) : ($m . 'min'); // find matching price $matchPrice = $pricing->first(fn($p) => str_contains(strtolower($p->label), (string)$h) || $p->label === $label); $durOptions[] = ['minutes' => $d, 'label' => $label, 'price' => $matchPrice?->price]; } // If no options built (minDur=0 etc), add a default if (empty($durOptions)) { $durOptions[] = ['minutes' => 60, 'label' => '1h', 'price' => $pricing->first()?->price]; } @endphp
{{-- Sidebar --}} {{-- Main --}}
{{-- Calendar --}}
← Select a duration to get started
{{-- Slots --}}
Available times
{{-- Form --}}
@if($errors->any())
@foreach($errors->all() as $e)
• {{ $e }}
@endforeach
@endif
@csrf

Payment on arrival

@endsection