<?php $__env->startSection('contentchild'); ?>

<style>
.help-block{
  color:red;
}
.is-invalid{border:1px solid red !important;}
</style>

   <?php 

//dd($list);

   ?>              
<div class="col-sm-6 col-sm-offset-3">
                         <h3 class="text-center">Create Subcategory</h3> 
                                    <form method="post" action="<?php echo e(route('postsubcategory')); ?>">
<?php echo csrf_field(); ?>

<input type="hidden" name="id" value="<?php echo e(!empty($list->id)?$list->id:''); ?>" />
          <?php $__currentLoopData = ["success","error"]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(Session::has($status)): ?>
<div class="alert alert-<?php echo e($status); ?> alert-dismissible">
  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
  <strong><?php echo e($status); ?>!</strong> <?php echo e(Session::get($status)); ?> action.
</div>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

<div class="form-group">
                                            <label for="password">Category</label>
<select class='<?php $__errorArgs = ['cat_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> form-control' name='cat_id'>
    <option value=''>-- Select--</option>

 
<?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

<option value="<?php echo e($value->id); ?>"  <?php echo e(!empty($list->cat_id)?(($list->cat_id==$value->id)?'selected': ''):''); ?>   ><?php echo e($value->categorynm); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

</select>
 <?php if($errors->has('cat_id')): ?>
  <p class="help-block"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
            <?php echo e($errors->first('cat_id')); ?></p>
        <?php endif; ?>


                                          </div>



                                      <div class="form-group">
                                            <label for="password">Punch Line</label>
<input id="subcategorynm" type="text"  class="<?php $__errorArgs = ['subcategorynm'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> form-control" autocomplete="off" name="subcategorynm"  value="<?php echo e(!empty($list->subcategorynm)?$list->subcategorynm:''); ?>"  >
 <?php if($errors->has('subcategorynm')): ?>
  <p class="help-block"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
            <?php echo e($errors->first('subcategorynm')); ?></p>
        <?php endif; ?>
                                          </div>

   


<div class="col-sm-12 text-center">
<button type="submit" name="change" class="btn btn-primary" >create</button>

</div>
 </form>
                             
        </div>



     <?php $__env->stopSection(); ?>
             
<?php echo $__env->make('layout/master2', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/utjn1ubt98bo/public_html/sangyatraders.com/admin/resources/views/subcategory.blade.php ENDPATH**/ ?>