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

		<div class="box box-primary">
            <div class="box-header with-border">
              <i class="fa fa-edit"></i><h3 class="box-title">Editar Categoria</h3>
               <button class="btn btn-primary pull-right" type="button" id="btn_add_attr">
                  <i class="fa fa-plus"></i>
                </button>
                 <button class="btn btn-primary pull-right" type="button" id="buttonremove">
                  <i class="fa fa-minus"></i>
                </button>
            </div>

          
            <!-- /.box-header -->
            <!-- form start -->
            <form role="form" action = "/categories/editar/<?php echo e($data->id); ?>" method="post">
            <?php echo e(method_field('PUT')); ?>

             <?php echo e(csrf_field()); ?>

           
              <div class="box-body">
                <div class="form-group">
                  <label for="exampleInputEmail1">Nombre de la categoria</label>
                  <input required maxlength="200" type="text" name="name" value="<?php echo e($data->name); ?>" class="form-control" placeholder="Nombre de la categoria ">
                </div>
                <div class="form-group">
                  <label for="exampleInputPassword1">Descripción</label>
                  <input required maxlength="200" name="description" type="text" value="<?php echo e($data->description); ?>"  class="form-control"  placeholder="descriptión">
                </div>
                <div class="form-group">
                  <label for="exampleInputPassword1">Tipo de Categoria</label>
                  <select name="type" class="form-control">
                  <?php if($data->type=='add'): ?>
                    <option value="add" selected>Categoria de entrada</option>
                    <option value="out">Categoria de Retiro</option>
                  <?php else: ?>
                    <option value="add" >Categoria de entrada</option>
                    <option value="out" selected>Categoria de Retiro</option>
                  <?php endif; ?>
                  </select>
                </div>
            
            <?php $__currentLoopData = $data1; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data1s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
             <div class="col-md-6">  
              <label for="exampleInputPassword1">Nombre  </label>
                   <div class="form-group">
          
                    <input type="hidden" value="<?php echo e($data1s->id); ?>" name="id[]">
                    <input required maxlength="200" name="name_[]" type="text" value=" <?php echo e($data1s->name); ?>"  class="form-control"  placeholder="Nombre de la subcategoria">
          
                  </div>
              </div>
               <div class="col-md-5">  
                <label for="exampleInputPassword1"> Valor </label>
                   <div class="form-group">
                    <input required maxlength="200" name="value_[]" type="text" value=" <?php echo e($data1s->value); ?>"  class="form-control"  placeholder="valores">
                  
                  
                  </div>
              </div>
               <div class="col-md-1">  
                      <label for="exampleInputPassword1"> &nbsp; </label>
                      <div class="form-group">
                        <a onclick='if(confirmDel() == false){return false;}' href="/categories/eliminarattr/<?php echo e($data1s->id); ?>"><i class="fa fa-trash"></i></a> 
                      </div>
                    </div>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
               <div class="box-body" id="list_attr">
              </div>
              <div class="box-footer">
                <button type="submit" class="btn btn-primary">Editar</button>
              </div>
            </form>
        </div>
												

	

<?php $__env->stopSection(); ?>

<?php echo $__env->make('adminlte::layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>