@props(['ad']) @php // Retrieve all the vehicle bookings associated with the ad // dd($ad->vehicleBooking()); $vehicleBookings = $ad?->vehicleBooking()?->get(); // Initialize an array to store disabled date ranges $disabledDates = []; // Loop through the bookings and collect the start and end date ranges if (isset($vehicleBookings)) { foreach ($vehicleBookings as $booking) { $disabledDates[] = [ 'from' => \Carbon\Carbon::parse($booking->start_date) ->subDay() ->format('Y-m-d'), 'to' => \Carbon\Carbon::parse($booking->end_date)->format('Y-m-d'), // Add one day to end_date ]; } } @endphp

{{ __('messages.t_trip_dates') }}

{{ __('messages.t_start_date') }}

{{ __('messages.t_end_date') }}

{{ __('messages.t_trip_time') }}

{{config('app.currency_symbol')}}{{ $ad->price }} / Per day
{{ __('messages.t_car_book') }}