@extends('layouts.app') @section('content')
@include('partials.header') @include('partials.sidebar')

Import Rooms from Excel

@if ($errors->any())
Please correct the following errors:
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if (session('success'))
{{ session('success') }}
@endif @if (session('import_errors'))
Import Errors Details:
@foreach (session('import_errors') as $error)
Row {{ $error['row'] }}:
    @foreach ($error['errors'] as $errorMsg)
  • {{ $errorMsg }}
  • @endforeach
@endforeach
@endif
Upload Excel File
Debug Info: Form action: {{ route('rooms.import') }}
@csrf
Supported formats: .xlsx, .xls. Maximum size: 10MB
Import Instructions
Before You Start
  1. Download the Excel template using the button above
  2. Fill in your room data according to the template format
  3. Save your file and upload it here
Column Requirements
room: Required Unique room number/name (max 128 characters)
guestname: Optional Guest name (max 256 characters)
description: Optional Room description (max 1000 characters)
username_cast: Optional WiFi network name/SSID (max 2048 characters)
password_cast: Optional WiFi password (8-12 characters)
Important Notes
  • Room type will be automatically set to default (ID: 1)
  • Both WiFi SSID and password are required for QR code generation
  • Duplicate room names will be skipped
  • Invalid rows will be skipped with error details shown
  • Room status will be set to "checked_out" by default
Troubleshooting
  • Make sure your file is saved as .xlsx or .xls format
  • Check that the file size is under 10MB
  • Ensure the first row contains the column headers exactly as shown in the template
  • Don't leave empty rows between data
@endsection