@extends('layouts.app') @section('title', 'Rooms') @section('content')
Manage room types for {{ $hotel->name }}
@if($canAddRoom) Add Room @else Room limit reached ({{ $hotel->rooms()->count() }} / {{ $hotel->maxRooms() ?: '∞' }}) @endif
Plan limit: {{ $hotel->rooms()->count() }} of {{ $hotel->maxRooms() }} room types used.
@endif| # | Room Type | Rooms | Room Numbers | Max Guests | Pricing | Status | Actions |
|---|---|---|---|---|---|---|---|
| {{ $rooms->firstItem() + $loop->index }} |
{{ $room->name }}
@if($room->description)
{{ $room->description }} @endif |
{{ $room->room_count }} | @if($room->units->isNotEmpty()) @foreach($room->units as $unit) {{ $unit->room_number }}@if($unit->label) ({{ $unit->label }})@endif @endforeach @else — @endif | {{ $room->max_occupancy }} |
@php
$plan = $room->ratePlans->first();
$fmtPrice = function ($value) {
if ($value === null || $value === '') {
return '0';
}
$amount = (float) $value;
return fmod($amount, 1.0) === 0.0
? number_format($amount, 0, '.', ',')
: rtrim(rtrim(number_format($amount, 2, '.', ','), '0'), '.');
};
@endphp
@if($plan)
@php
$hasLocal = (float) ($plan->local_base_rate ?? 0) > 0;
$hasIntl = (float) ($plan->base_rate ?? 0) > 0;
@endphp
@if($hasLocal || $hasIntl)
@if($hasLocal)
Local: {{ $fmtPrice($plan->local_base_rate) }} {{ $plan->local_currency ?? $hotel->currency }}
@endif
@if($hasLocal && $hasIntl) @endif @if($hasIntl) Intl: {{ $fmtPrice($plan->base_rate) }} {{ $plan->international_currency ?? 'USD' }} @endif @if($room->photos_count > 0) {{ $room->photos_count }} photo(s) @endif @else Set prices @endif @else Set prices @endif |
@if($room->is_enabled) Active @else Inactive @endif | Edit |
| No rooms yet. @if($canAddRoom) Add your first room — only 4 fields to fill in. @endif | |||||||
Manage prices under Settings → Prices. Update daily availability under Update Rooms.