@extends('layouts.app') @section('title', 'Rooms') @section('page-title', 'Rooms') @section('content')
@php $hotelId = auth()->user()->hotel_id; $statusCounts = \App\Models\Room::where('hotel_id',$hotelId)->selectRaw('status, count(*) as count')->groupBy('status')->pluck('count','status'); @endphp
{{ $statusCounts['available'] ?? 0 }}
Available
{{ $statusCounts['occupied'] ?? 0 }}
Occupied
{{ $statusCounts['reserved'] ?? 0 }}
Reserved
{{ $statusCounts['maintenance'] ?? 0 }}
Maintenance
@forelse($rooms as $room) @empty @endforelse
Room No.TypeFloorBlockStatusPrice/NightActions
{{ $room->room_number }} {{ $room->roomType->name }} {{ $room->floor ?: '—' }} {{ $room->block ?: '—' }} @if($room->status==='available') Available @elseif($room->status==='occupied') Occupied @elseif($room->status==='reserved') Reserved @elseif($room->status==='maintenance') Maintenance @if($room->maintenance_end)
Until {{ $room->maintenance_end->format('d M') }}
@endif @endif
₦{{ number_format($room->roomType->base_price, 0) }}
@if($room->status === 'available') @elseif($room->status === 'maintenance')
@csrf
@endif

No rooms added

Add your first room to get started.

Add Room
@if($rooms->hasPages()) @endif
@endsection