<?= $this->extend('layouts/main') ?>

<?= $this->section('title') ?>
Edit Kategori
<?= $this->endSection() ?>

<?= $this->section('content') ?>
<div class="container">
    <h3>Edit Kategori</h3>

    <form action="<?= base_url('admin/category/update/' . $category['id']) ?>" method="post">
        <?= csrf_field() ?>

        <div class="form-group mb-3">
            <label for="nama">Nama Kategori</label>
            <input type="text" class="form-control" name="nama" value="<?= esc($category['nama']) ?>" required>
        </div>

        <button type="submit" class="btn btn-primary">Update</button>
        <a href="<?= base_url('admin/category') ?>" class="btn btn-secondary">Kembali</a>
    </form>
</div>
<?= $this->endSection() ?>
