@extends('layouts.app') @section('content') {{--
--}}
Finding best hotels for you, please wait...
agency_id !="") action="{{ route('employeeshow.hotels') }}" @else action="{{ route('show.hotels') }}" @endif method="GET" class="search-form" id="searchForm"> @csrf
Traveler's origin
Where to stay
Specific location
Check-in & Check-out
Travel party
@if(!empty($hotels))
{{ count($hotels) }} Hotels Found
agency_id !="") action="{{ route('employeeshow.filterdhotels') }}" @else action="{{ route('show.filterdhotels') }}" @endif method="GET" id="rateTypeForm" class="d-flex flex-wrap align-items-end gap-3"> @csrf @php //$rateType = "comprehensive"; $rateType = "concise"; if(isset($SelectedData['rate_type'])){ $rateType = $SelectedData['rate_type']; } @endphp

Sort by

@endif
@if(count($SelectedData) && count($hotels) == 0)
No Hotels Found

No Hotels Found

We couldn't find any hotels that match your search. Try modifying the filters, changing the dates, or exploring nearby areas.

@endif @if(count($hotels))
@endif @if(count($hotels) || isset($defaulthotels))
agency_id !="") href="{{ route('employeehotels.filter') }}" @else action="{{ route('hotels.filter') }}" @endif method="POST" id="filterForm1"> @csrf
Filters
@if(isset($defaulthotels)) @else @endif {{-- Preferences --}}
Preferences
@foreach(['Free Cancellation', 'Breakfast Included', 'Top Rated'] as $option)

@endforeach
{{-- Star Rating --}}
Star Rating
@foreach([5, 4, 3, 2, 1] as $star)
@endforeach
{{-- Properties --}}
Property Type
@foreach ([ '0' => 'Hotels', '3' => 'Apartments / Aparthotel' ] as $value => $label)
@endforeach
{{-- Price Range --}}
Price Range
{{-- Room Facilities --}}
Room Facilities
@foreach(['Free WiFi', 'Free Self Parking', 'Free Dinner'] as $facility)
@endforeach
@endif @if(!empty($hotels))
@php $Com_Markup = DB::table('users')->where('id',1)->get(); $Age_Markup = []; $User_id = 0; if(Auth::user()->agency_id != ""){ $emp_id = Auth::user()->agency_id; $Age_Markup = DB::table('users')->where('id',$emp_id)->get(); }else{ $User_id = auth()->id(); } if(count($Com_Markup) && $User_id != 1 ){ $Com_Amt = $Com_Markup[0]->markup; $type = "percentage"; } if(count($Age_Markup) && $User_id != 1 && isset($emp_id)){ $Age_Amt = $Age_Markup[0]->markup; } @endphp @forelse($hotels as $hotel) @php $image = $hotel['images']['url'] ?? 'https://via.placeholder.com/400x250?text=No+Image'; $hotelName = $hotel['name'] ?? 'Unnamed Hotel'; $address = $hotel['address'] ?? ''; $distance = '13.8'; $starRating = $hotel['category'] ?? 3; $rating = number_format(rand(40, 48) / 10, 1); $ratingCount = rand(100, 500); if($rateType == "concise"){ $rates = $hotel['min_rate'] ?? []; $firstRate = $rates ?? null; }else{ $rates = $hotel['rates'] ?? []; $firstRate = $rates[0] ?? null; } $currency = $firstRate['currency'] ?? 'INR'; $promo = $firstRate['promotions_details'][0] ?? null; $originalPrice = $firstRate['price_details']['net'][1]['amount'] ?? 0; $cancel_type = $hotel['min_rate']['cancellation_policy']['amount_type'] ?? ''; $amount_type = $firstRate['price_details']['net'][1]['amount_type'] ?? ''; $price = $firstRate['price'] ?? 0; //print_r($price);echo "---"; //print_r($originalPrice); //print_r($originalPrice); $promoText = $firstRate['promotions_details'][0] ?? ''; $discountPercent = 0; $facilities = explode(';', $hotel['facilities'] ?? ''); $facilities = array_map('trim', $facilities); // remove whitespace $sampleFacilities = collect($facilities)->filter()->shuffle()->take(3); if (preg_match('/(\d+)\s?%/', $promoText, $matches)) { $discountPercent = (int)$matches[1]; } $originalPrice = $price; if ($discountPercent > 0) { $originalPrice = ceil($price / (1 - ($discountPercent / 100))); } $taxAmount = 0; $surchargeAmount = 0; //foreach(($firstRate['price_details']['hotel_charges'] ?? []) as $tax) { // $taxAmount += $tax['amount'] ?? 0; //} foreach(($firstRate['price_details']['surcharge_or_tax'] ?? []) as $surcharge) { $surchargeAmount += $surcharge['amount'] ?? 0; $taxAmount += $surcharge['amount'] ?? 0; } $price = $price - $surchargeAmount; //echo $price; $val = 0 ; $P_val = 0 ; $O_val = 0; $val1 = 0; if (isset($Com_Amt)) { if ($type == "percentage") { $val1 = ($originalPrice * $Com_Amt) / 100; $val = ($price * $Com_Amt) / 100; } else { $val = $Com_Amt; } } $price = $price+$val; $originalPrice = $originalPrice+$val1; //echo $price; if (isset($Age_Amt) && isset($emp_id)) { $originalPrice = ($originalPrice * $Age_Amt) / 100 + $originalPrice; $price = ($price * $Age_Amt) / 100 + $price; } $paxComment = $firstRate['rate_comments']['pax_comments'] ?? ''; $shortDescription = $hotel['address'] ?? ''; $hotelCode = $hotel['hotel_code'] ?? ''; $search_id = $hotel['search_id'] ?? ''; @endphp
{{ $hotelName }}
{{ $hotelName }} {!! str_repeat('', $starRating) !!}
{{ $address }}
@if($promo)
@endif
@foreach($sampleFacilities as $facility) @php $text = strtolower($facility); $icon = 'bi-check2'; // Default icon if (Str::contains($text, 'pool')) $icon = 'bi-water'; elseif (Str::contains($text, 'wifi') || Str::contains($text, 'wireless')) $icon = 'bi bi-wifi'; elseif (Str::contains($text, 'wired internet')) $icon = 'bi bi-globe'; elseif (Str::contains($text, 'parking')) $icon = 'bi bi-car-front'; elseif (Str::contains($text, 'air')) $icon = 'bi bi-wind'; elseif (Str::contains($text, 'restaurant')) $icon = 'bi bi-cup-straw'; elseif (Str::contains($text, 'room service')) $icon = 'bi bi-bell'; elseif (Str::contains($text, 'laundry')) $icon = 'bi bi-basket'; elseif (Str::contains($text, 'housekeeping')) $icon = 'bi bi-brush'; elseif (Str::contains($text, 'safe deposit')) $icon = 'bi bi-shield-lock'; elseif (Str::contains($text, 'atm') || Str::contains($text, 'cash')) $icon = 'bi bi-credit-card'; elseif (Str::contains($text, 'medical')) $icon = 'bi bi-hospital'; elseif (Str::contains($text, 'pets')) $icon = 'fas fa-paw'; elseif (Str::contains($text, 'meeting')) $icon = 'bi bi-people'; elseif (Str::contains($text, 'currency')) $icon = 'bi bi-currency-exchange'; elseif (Str::contains($text, 'car rental')) $icon = 'bi bi-truck-front'; elseif (Str::contains($text, 'adjoining')) $icon = 'bi bi-door-open'; elseif (Str::contains($text, 'spa')) $icon = 'bi bi-droplet'; elseif (Str::contains($text, 'game room')) $icon = 'bi bi-controller'; elseif (Str::contains($text, 'security')) $icon = 'bi bi-shield-shaded'; elseif (Str::contains($text, 'business center')) $icon = 'bi bi-briefcase'; elseif (Str::contains($text, 'elevator')) $icon = 'bi bi-building'; elseif (Str::contains($text, 'gift') || Str::contains($text, 'news')) $icon = 'bi bi-bag-heart'; elseif (Str::contains($text, 'lounge') || Str::contains($text, 'bar')) $icon = 'bi bi-cup-hot'; elseif (Str::contains($text, 'front desk')) $icon = 'bi bi-person-lines-fill'; elseif (Str::contains($text, 'fitness') || Str::contains($text, 'gym') || Str::contains($text, 'exercise')) $icon = 'bi bi-dumbbell'; elseif (Str::contains($text, 'sauna')) $icon = 'bi bi-thermometer-half'; elseif (Str::contains($text, 'porter') || Str::contains($text, 'bell staff')) $icon = 'bi bi-bell-fill'; elseif (Str::contains($text, 'cloakroom')) $icon = 'bi bi-lock'; elseif (Str::contains($text, 'coffee') || Str::contains($text, 'tea')) $icon = 'bi bi-cup'; elseif (Str::contains($text, 'terrace') || Str::contains($text, 'roof')) $icon = 'bi bi-house'; elseif (Str::contains($text, 'newspaper')) $icon = 'bi bi-newspaper'; elseif (Str::contains($text, 'phone')) $icon = 'bi bi-telephone'; elseif (Str::contains($text, 'valet')) $icon = 'bi bi-person-standing-dress'; elseif (Str::contains($text, 'tour') || Str::contains($text, 'sightseeing')) $icon = 'bi bi-binoculars'; elseif (Str::contains($text, 'daily')) $icon = 'bi bi-calendar-day'; @endphp {{ $facility }} @endforeach
@if(isset($hotel['min_rate']['rooms'][0]['description']))
Recommended Room
@php $desc = $hotel['min_rate']['rooms'][0]['description']; $words = explode(' ', $desc); $chunks = array_chunk($words, 10); $final = ''; foreach($chunks as $chunk){ $final .= implode(' ', $chunk) . "
"; } @endphp
{!! $final !!}
@endif
@php //print_r($cancel_type); @endphp @if(!empty($cancel_type))
Refundable
@endif @if(isset($rates['non_refundable']) && $rates['non_refundable'] == 1)
Non-Refundable

@endif @if($promo)
{{ $promo }}


Limited Time Offer
@if(strtolower($currency) == "inr") ₹ @endif {{ number_format($originalPrice) }} {{ $currency }}
@endif
@if(strtolower($currency) == "inr") ₹ @endif {{ number_format($price) }} {{ $currency }}
@if($taxAmount > 0)
+ @if(strtolower($currency) == "inr") ₹ @endif {{ number_format($taxAmount, 2) }} taxes & fees
@else
Taxes included
@endif
@empty
No hotels available.
@endforelse
@endif @if(!empty($hotels)) @endif
@if(empty($hotels) && isset($bookingval))

Booking List

@if(session('emailsuccess'))
{{ session('emailsuccess') }}
@endif @if(session('cancelmsg'))
{{ session('cancelmsg') }}
@endif
@if(session('success')) @endif
@csrf


@csrf
Selected
@foreach($bookingval as $index => $booking) @endforeach
# Booking Id Booking Reference Customer Name Email Destination Checkin Checkout Address Amount Status Actions
{{ $index+1 }} {{ $booking->booking_id }} {{ $booking->booking_reference }} {{ $booking->holder_name }} {{ $booking->holder_surname }} {{ $booking->holder_email }} {{ $booking->city_name }}, {{ $booking->country_name }} {{ \Carbon\Carbon::parse($booking->checkin)->format('d-M-Y') }} {{ \Carbon\Carbon::parse($booking->checkout)->format('d-M-Y') }} {{ $booking->hotel_address }} {{ number_format($booking->total_price, 2) }} {{ $booking->currency }} @if($booking->status === 'confirmed') Confirmed @else Cancelled @endif
@if($bookingval->hasPages()) @endif
@endif @endsection