<?php $__env->startSection('title'); ?>
Document Type
<?php $__env->stopSection(); ?>


<?php $__env->startSection('content'); ?>
<section class="content">

<div class = "row">
        <div class="col-md-6">

        <div class="card card-primary ">
        <div class="card-body ">
        <div class="card-header">
            <h3 class="card-title"><i class="fa fa-users mr-1"></i> Document Type </h3>
       </div>
       
        <div class="card-body table-responsive p-0 ">
    
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                       <!--  <th> Id</th> -->
                        <th>Document Type</th>
                        <th>Action</th>
                
                    </tr>
                </thead>
                <tbody>
                       <?php $__empty_1 = true; $__currentLoopData = $documenttypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $documenttypee): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td><?php echo e($documenttypee->document_type_name); ?></td>
                            <td>
                                <div class="row">
                                 <a class="btn btn-sm btn-flat btn-warning" href="<?php echo e(route('documenttype.edit',$documenttypee->document_type_id)); ?>"><i class="fa fa-edit"></i> </a>
                                 <form action="<?php echo e(route('documenttype.destroy', $documenttypee->document_type_id )); ?>" method="POST" onclick="return confirm('Are you sure you want to delete this item?')" >
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?> 
                                 <button type="submit" class="btn btn-sm btn-flat btn-danger"><i class="fa fa-trash-alt"></i></button>
                                 </form>
                                </div>
                            </td>
                        </tr>
                     <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td><i class="fas fa-folder-open"></i> No Record found </td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table><br>
        <div class="float-right">
           <?php echo e($documenttypes->links()); ?>

        </div>
       
        </div>

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


         <div class="col-md-6">
            <div class="card">
                 <div class="card-header">
                    <?php if(isset($documenttype->document_type_id)): ?>
                        <h5> Edit Document Type </h5>
                         <a style="position: absolute;top: 10px;right: 10px;" href="<?php echo e(route('documenttype.index')); ?>" class="btn btn-danger"><i class="fa fa-shield-alt"></i> Back</a>
                     <?php else: ?>
                        <h5> Add New </h5>
                     <?php endif; ?>
                 </div>


                <div class="card-body">
                             
                    <?php if(isset($documenttype->document_type_id)): ?>
                
                    <form class="form-horizontal" method="POST" action="<?php echo e(route('documenttype.update',$documenttype->document_type_id)); ?>">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('PUT'); ?>
                        
                    <?php else: ?>
                    <form class="form-horizontal" method="POST" action="<?php echo e(route('documenttype.store')); ?>">
                        <?php echo csrf_field(); ?>
                    <?php endif; ?>
                                
                        <div class="row">
                              <div class="col-md-12">
                                 <div class="form-group">
                                    <label for="First Name">Document Type</label>
                                      <textarea style="resize:none" name="document_type_name" required class="form-control editor" cols="2" rows="1"><?php if(isset($documenttype->document_type_id)): ?><?php echo e($documenttype->document_type_name); ?>

                                      <?php else: ?>
                                        <?php echo e(old('document_type_name')); ?>

                                      <?php endif; ?>
                                  </textarea>
                                    <?php $__errorArgs = ['document_type_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <span class="invalid-feedback" role="alert">
                                            <strong><?php echo e($message); ?></strong>
                                        </span>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>

                                <br>
                                <div class="form-group button">
                                    <button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> Submit</button>
                                   
                                </div>
                            </div>
                        </div>
                        
                    </form>
                </div>

        </div>
        </div>

    </div>


    <!-- /.card-body -->
    

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

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/kart/retirement.creatorkart.com/retirement/resources/views/documenttype/index.blade.php ENDPATH**/ ?>