@extends('layouts.main-layout') @section('title') Create Room | Dashboard @endsection @section('content') @if(!request('rooms') || request('rooms') <= 1)

Create Rooms

@csrf
@error('name') {{$errors->first('name')}} @enderror
@error('description') {{$errors->first('description')}} @enderror
@error('room_type') {{$errors->first('room_type')}} @enderror
@error('floor') {{$errors->first('floor')}} @enderror
@else

Create Rooms

@php $rooms = request('rooms') > 40 ? 40 : request('rooms'); @endphp @for($i=0; $i< $rooms; $i++)
@csrf
@error("names.$i") {{$errors->get("names.$i")[0]}} @enderror
@error("room_types.$i") {{$errors->get("room_types.$i")[0]}} @enderror
@error("floors.$i") {{$errors->get("floors.$i")[0]}} @enderror
@error("descriptions.$i") {{$errors->get("descriptions.$i")[0]}} @enderror


@endfor
@endif
@endsection