@extends('layouts.admin') @section('title', 'Resorts') @section('content') @php $canEdit = \App\Http\Controllers\Admin\ResortController::allowed('edit'); // A resort reaches the website only when it is active; without an active room type // it is listed but cannot be booked, so flag it for the team. $live = $items->where('is_active', true); $noRooms = $live->where('active_rooms_count', 0)->count(); @endphp
@foreach([ ['Total resorts', $items->count(), 'fa-hotel', 'primary'], ['On website', $live->count(), 'fa-globe', 'success'], ['Inactive', $items->count() - $live->count(), 'fa-eye-slash', 'secondary'], ['Need room types', $noRooms, 'fa-bed', 'warning'], ] as [$label, $value, $icon, $tone])
{{ $value }}
{{ $label }}
@endforeach
Resorts & Rooms
Manage resort details, room types, rates and availability
Facilities @if(\App\Http\Controllers\Admin\ResortController::allowed('create')) Add Resort @endif
@if($items->isEmpty())
No resorts yet

Your resorts and room inventory will appear here.

@else @foreach($items as $item) @php $image = \App\Models\Setting::fileUrl($item->banner ?: ($item->gallery[0] ?? null)); @endphp @endforeach
ResortDestinationRoomsFrom / nightSourceWebsiteActions
@if($image) @else @endif
{{ $item->name }} @if($item->is_featured)@endif
/{{ $item->slug }}
{{ $item->destination?->name ?: '—' }} @if($item->rooms_count) {{ $item->active_rooms_count }} / {{ $item->rooms_count }} active @else None @endif {{ $item->starting_price !== null ? number_format((float) $item->starting_price, 2) : '—' }} {{-- Lowercased first: headline() spells an all-caps value out letter by letter ("O W N"). --}}
{{ Str::headline(strtolower($item->source_type)) }} · {{ Str::headline(strtolower($item->availability_mode)) }}
{{ $item->supplier?->name ?: Str::headline(strtolower($item->booking_mode)).' booking' }}
@if(! $item->is_active) Inactive @elseif($item->active_rooms_count === 0) Live · no rooms @else Live @endif @if($canEdit) Edit Add Room @endif
@endif
@endsection @push('scripts') @endpush