@extends("admin.admin_app") @section("content")

{{ isset($rooms->id) ? 'Edit Room' : 'Add Room' }} Details for {{ isset($hotels->hotel_name) ? $hotels->hotel_name : null }}

@include('admin.navigation-tabs')
@if (count($errors) > 0)
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if(Session::has('flash_message'))
{{ Session::get('flash_message') }}
@endif {!! Form::open(array('url' => array('admin/hotels/addroom'),'class'=>'form-horizontal padding-15','name'=>'category_form','id'=>'category_form','role'=>'form','enctype' => 'multipart/form-data')) !!}
@php $type = isset($rooms->type) ? $rooms->type : null; @endphp
Room Type AC Room Non-AC Room Heated Room
Total Number of Room(s)
Single Rooms
Twin Rooms
Double Rooms
Triple Rooms
SuiteApartmentVilla
Inter Connecting
Physically Challenged
Check In Hours
Check Out Hours

Room Facilities

@php $facilities = [ 'Tea Coffee Maker' => 'tea_coffee_maker', 'Television' => 'television', 'Refrigerator' => 'refrigerator', 'Iron & Ironing Board' => 'iron_ironing_board', 'Shaving Kit' => 'shaving_kit', 'Hair Dryer' => 'hair_dryer', 'Dental Kit' => 'dental_kit', 'Mini Bar' => 'mini_bar', 'Phone Near Toilet Seat' => 'phone_near_toilet_seat', 'In Room Service' => 'in_room_service', 'Wheelchair' => 'wheelchair', 'Room for Physically Challenged' => 'room_physical_challenge' ]; @endphp @foreach($facilities as $label => $key)
$key) && in_array($roomFacility->$key,['FOC','C','NA'])) checked @endif> {{ $label }}
$key) && $roomFacility->$key == 'FOC') checked @endif> FOC $key) && $roomFacility->$key == 'C') checked @endif> C $key) && $roomFacility->$key == 'NA') checked @endif> NA
@endforeach @if(isset($roomFacility->other_service)) @php $otherService = $roomFacility->other_service; @endphp @foreach($roomFacility->getAmentity as $key => $otherServ) @php $isChecked = in_array($otherServ->id, $otherService['name']); // Find matching index (so that the correct type is applied) $index = array_search($otherServ->id, $otherService['name']); $selectedType = $index !== false ? $otherService['type'][$index] : null; @endphp
{{ $otherServ->name }}
FOC C NA
@endforeach @endif
+
@if(isset($roomfacilities->other_service) && !empty($roomfacilities->other_service)) @php $otherService = json_decode($roomfacilities->other_service, true); @endphp @foreach($otherService['name'] as $key => $otherServ)
@endforeach @else
@endif
{!! Form::close() !!}
@endsection