<form role="form" id="form-add-room"> <?php echo csrf_field(); ?> <div class="form-body"> <div class="row"> <input type="hidden" name="hostel_id" value="<?php echo e($hostelId); ?>"> <div class="col-md-6"> <div class="form-group"> <label>Tên phòng <span class="required" aria-required="true"> (*) </span></label> <input type="text" class="form-control" name="name"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>Tầng / khu / dãy <span class="required" aria-required="true"> (*) </span></label> <input type="text" class="form-control" name="block_name"> </div> </div> </div> <div class="row"> <div class="col-md-4"> <div class="form-group" id="label-room-price"> <?php if($hostel->type_rent == \App\Models\Hostel::TYPE_RENT_ALL): ?> <label>Giá phòng <span class="required" aria-required="true"> (*) </span></label> <?php else: ?> <label>Giá phòng / người <span class="required" aria-required="true"> (*) </span></label> <?php endif; ?> <input type="text" class="form-control price-r" name="price" id="add-room-price"> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Diện tích (m2) <span class="required" aria-required="true"> (*) </span></label> <input type="text" class="form-control" name="size" id="add-room-size"> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Số người phù hợp <span class="required" aria-required="true"> (*) </span></label> <input type="text" class="form-control" name="max_renters" id="add-room-max-renters"> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label>Tiền cọc</label> <input type="text" class="form-control price-r" name="deposit"> </div> </div> <?php if($hostel->type_rent == \App\Models\Hostel::TYPE_RENT_ALL): ?> <div class="col-md-6"> <label>Ngày phòng sẽ trống</label> <div class="input-group"> <input type="text" class="form-control datepicker" name="date_available" value=""> <span class="input-group-btn"> <button class="btn blue set-empty" type="button">Xóa</button> </span> </div> </div> <?php endif; ?> </div> <div class="row" style="margin-top: 10px"> <div class="col-md-12"> <label>Tiện ích</label> <div class="row"> <?php $hostelAmenities = DB::table('hostel_amenities')->where('hostel_id', $hostelId)

                    ->pluck('amenities_id')->toArray(); ?> <?php $__currentLoopData = $amenities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $amenity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="col-md-3"> <label class="mt-checkbox mt-checkbox-outline" style="width: 100%"> <input type="checkbox" value="<?php echo e($amenity->id); ?>" name="amenities[]" <?php if(in_array($amenity->id, $hostelAmenities)): ?> checked <?php endif; ?>> <?php if(!empty($amenity->web_image)): ?> <img src="/files/<?php echo e($amenity->web_image); ?>" class="svg" style="max-height: 18px; max-width: 18px; margin-right: 3px"> <?php else: ?> <img src="/frontend3/amenity.svg" class="svg" style="max-height: 18px; max-width: 18px; margin-right: 3px"> <?php endif; ?> <?php echo e($amenity->name); ?> <span></span> </label> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="text-center"> <hr style="border-top: 1px dashed"> <p>Nếu phòng của bạn có tiện ích không xuất hiện trong danh sách. Hãy ấn nút "Bổ sung tiện ích" để thêm</p> <button class="btn btn-success" id="btn-add-amenity-room">Bổ sung tiện ích</button> </div> <div class="row"> <div class="col-md-12"> <div class="row" id="user_amenities"> </div> </div> </div> <hr style="border-top: 1px solid"> <div class="text-center" style="margin-top: 15px"> <p>Hãy chọn ít nhất 1 hình ảnh thật về phòng của bạn để tin đăng phòng hấp dẫn hơn và giúp người tìm trọ thấy được ảnh phòng của bạn</p> <button class="btn btn-success" id="btn-add-image-room">Bổ sung ảnh phòng</button> <hr style="border-top: 1px dashed"> </div> <div class="row"> <div class="col-md-12"> <div class="row" id="room_images"> </div> </div> </div> </div> </div> </div> </form>