Page 9 - Modul CRUD Laravel_Neat
P. 9

Isikan kode berikut:

                        <!DOCTYPE html>
                        <html>

                        <head>
                          <title>Data Harga Barang Hidroponik</title>
                          <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.
                        5.3/dist/css/bootstrap.min.css">
                          <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/boot
                        strap.bundle.min.js"></script>
                        </head>

                        <body>
                          <div class="container">
                            <div class="card">
                              <div class="card-body">
                                <h3>Data Harga Barang Hidroponik</h3>
                                <a class="btn btn-success mb-
                        2" href="/barang/add" role="button"> + Tambah Barang Baru</a>
                                <table class="table table-bordered">
                                  <tr>
                                    <th>No</th>
                                    <th>Nama Barang</th>
                                    <th>Jumlah Barang</th>
                                    <th>Harga Barang</th>
                                    <th>Opsi</th>
                                  </tr>
                                  @foreach($barang as $index=>$b)
                                  <tr>
                                    <td>{{ $index+1 }}</td>
                                    <td>{{ $b->nama_barang }}</td>
                                    <td>{{ $b->jumlah_barang }}</td>
                                    <td>{{ $b->harga_barang }}</td>
   4   5   6   7   8   9   10   11   12   13   14