<?php $__env->startSection('title', 'Create Category'); ?>
<?php $__env->startSection('content'); ?>

<div class="page-bx">
    <div class="row">
        <div class="col-md-12">
        <form method="POST" action="<?php echo e(route('subcategories.store')); ?>" accept-charset="UTF-8">
            <?php echo csrf_field(); ?>
            <h3>Create New Category:</h3>
            <div class="form-group">
                <label>App:</label>
                <select name="category_id" class="form-control">
                    <option value="">Select App</option>
                    <?php $__currentLoopData = $category; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($cat); ?>"> <?php echo e($value); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php if($errors->has('category_id')): ?>
                    <span class="text-danger"><?php echo e($errors->first('category_id')); ?></span>
                <?php endif; ?>
            </div>
            <div class="form-group">
                <label>Name:</label>
                <input class="form-control" name="name" type="text" id="name" placeholder="Category Name">
                <?php if($errors->has('name')): ?>
                    <span class="text-danger"><?php echo e($errors->first('name')); ?></span>
                <?php endif; ?>
            </div>
            <div class="form-group">                            
                <button class="btn" type="submit">Save</button>
                <a href="<?php echo e(url('subcategories')); ?>" class="btn">Back</a>
            </div>
        </form>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.default', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>