<form action="<?php echo e(isset($category) ? route('admin.categories.update', $category->id) : route('admin.categories.store')); ?>" method="POST">
    <?php echo csrf_field(); ?>

    <?php if(isset($category)): ?>
        <?php echo method_field('PUT'); ?>
    <?php endif; ?>

    <div class="mb-3">
        <label class="form-label">Category Name</label>
        <input type="text" name="name" class="form-control" value="<?php echo e(old('name', $category->name ?? '')); ?>" required>
    </div>

    <button class="btn btn-success">
        <?php echo e(isset($category) ? 'Update' : 'Save'); ?>

    </button>
</form>
<?php /**PATH E:\xampp2\htdocs\ayz\resources\views/admin/categories/form.blade.php ENDPATH**/ ?>