<td></td>
<td>
    <div class="form-group"><input class="form-control" name="name" type="text" value="<?php echo e($item->name); ?>"></div>
</td>
<td>
    <div class="form-group">
        <select class="form-control" name="bike_types[]">
            <option <?php if($item->type == \App\Models\RenterRoom::BICYCLE): ?> selected=""
                    <?php endif; ?> value="<?php echo e(\App\Models\RenterRoom::BICYCLE); ?>">Xe đạp
            </option>
            <option <?php if($item->type == \App\Models\RenterRoom::ELECTRIC_BIKE): ?> selected=""
                    <?php endif; ?> value="<?php echo e(\App\Models\RenterRoom::ELECTRIC_BIKE); ?>">Xe điện
            </option>
            <option <?php if($item->type == \App\Models\RenterRoom::MOTORBIKE): ?> selected=""
                    <?php endif; ?> value="<?php echo e(\App\Models\RenterRoom::MOTORBIKE); ?>">Xe máy
            </option>
            <option <?php if($item->type == \App\Models\RenterRoom::CAR): ?> selected=""
                    <?php endif; ?> value="<?php echo e(\App\Models\RenterRoom::CAR); ?>">Xe ô tô
            </option>
        </select>
    </div>
</td>
<td>
    <div class="form-group"><input class="form-control" name="bks" type="text" value="<?php echo e($item->bks); ?>"></div>
</td>
<td class="text-center">
    <div class="form-group">
        <img class="preview-edit " src="<?php echo e(url('files/'.$item->image)); ?>" style="object-fit: contain; width: 100px; height: 100px; text-align: center"/>
        <label for="bike_image-edit" class="btn glyphicon glyphicon-open" style="font-size: 13px; border: dashed 1px"> Chọn ảnh</label>
        <input id="bike_image-edit" class="form-control" type="file" name="bike_image" accept="image/*" style="visibility: hidden"  onchange="readURL(this);">
    </div>
</td>
<td>
    <button href="#" class="btn btn-sm btn-success btn-save-edit-bike" data-id="<?php echo e($item->id); ?>"> Lưu</button>
    <button href="#" class="btn btn-sm btn-danger btn-cancel-edit-bike" data-id="<?php echo e($item->id); ?>"> Hủy</button>

</td>
<script>
    function readURL(input) {
        if (input.files && input.files[0]) {
            var reader = new FileReader();

            reader.onload = function (e) {
                $('.preview-edit')
                    .attr('src', e.target.result)
                    .width(100)
                    .height(100)
                    .css('objec-fit','contain');
            };

            reader.readAsDataURL(input.files[0]);
        }
    }
</script>