<?php $__env->startSection('content'); ?>
<title>Edit Data Barang</title>
<div class="card-header py-3">
  <h6 class="m-0 font-weight-bold text-dark">Edit Data</h6>
</div>
<div class="card-body">
    <div class="x_content">
            <form action="/barang/update" method="post">
                    <?php echo e(csrf_field()); ?>

                  <div class="form-group">
                      <label for="">Kode Barang</label>
                      <input type="hidden" name="id" value="<?php echo e($barang2->id_barang); ?>">
                    <input type="text" name="id_barang" class="form-control" value="<?php echo e($barang2->id_barang); ?>" required placeholder="Masukan Nama">
                  </div>
                  <div class="form-group">
                      <label for="">Kategori</label>
                      <select name="kategori_id" id="" class="form-control" required>
                        <?php $__currentLoopData = $kategori; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                          <?php if($barang2->kategori_id==$k->id_kategori): ?>
                              <option value="<?php echo e($k->id_kategori); ?>" selected><?php echo e($k->nama_kategori); ?></option>
                              <?php else: ?>
                              <option value="<?php echo e($k->id_kategori); ?>"><?php echo e($k->nama_kategori); ?></option>
                          <?php endif; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      </select>
                    
                  </div>
                  <div class="form-group">
                        <label for="">Nama Barang</label>
                        <input type="text" name="nama_barang" class="form-control" value="<?php echo e($barang2->nama_barang); ?>" required placeholder="Masukan barang">
                  </div>
                  <div class="form-group">
                      <label for="">Jenis</label>
                      <input type="text" name="satuan" class="form-control" value="<?php echo e($barang2->satuan); ?>" required>
                  </div>
                  <div class="form-group">
                        <label for="">Jumlah</label>
                        <input type="text" name="jumlah" class="form-control" value="<?php echo e($barang2->jumlah); ?>" required placeholder="Masukan Ruangan">
                    </div>
                </div>
                  <button type="submit" class="btn btn-primary">Simpan</button>
            </form>

    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH R:\xampp\htdocs\laravel_sarpras\resources\views/barang/edit.blade.php ENDPATH**/ ?>