<div class="container">
<h1>Hasil Pencarian : <?= $num ?></h1>

<div class="row">
  <?php foreach($hasil as $brg):?>
  <div class="col-4 m-4">
    <div class="card" >
              <img src="<?php echo base_url().'/uploads/'.$brg->gambar ?>" class="card-img-top img-thumbnail" alt="...">
              <div class="card-body">
                <h5 class="card-title mb-1"><?php echo $brg->nama_brg ?></h5>
                <small><?php echo $brg->keterangan ?></small><br>
                <span class="badge badge-pill badge-success mb-3">Rp. <?php echo number_format($brg->harga+$brg->keuntungan, 0,',','.') ?></span>
                <br><?php echo anchor('dashboard/tambah_ke_keranjang/' .$brg->id_brg,'<div class="btn btn-sm btn-primary">Tambah ke Keranjang</div>') ?>
                 <?php echo anchor('dashboard/detail/' .$brg->id_brg,'<div class="btn btn-sm btn-success">Detail</div>') ?>
                
              </div>
            </div>
</div>
<?php endforeach;?>
</div>

</div>