

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



<div class="card mb-4">
    <div class="card-header">
        <div class="d-flex">
            <div class="mr-auto p-2 align-self-center"><h4>Employees</h4></div>
            <div class="p-2">              
            <a class="btn btn-primary" href="<?php echo e(route('Employee.create')); ?>"><i class="fa fa-plus"></i> ADD New</a>
            </div>           
        </div>
    </div>
    <div class="card-body">
        <div class="table-responsive">
            <table class="table">
                <thead>
                    <tr>
                        <!--th>SLNO.</th-->
                        <th>Name</th>
                        <th>Nickname</th> 
                        <th>Designation</th>   
                        <th>Contact</th> 
                        <th>Address</th>
                        <th>Photo</th>
                        <th>Id Proof</th>
                        <th>Narration</th>                
                        <th colspan="">Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $Employees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $Employee): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($Employee->user->name); ?></td>
                        <td><?php echo e($Employee->nickname); ?></td>
                        <td><?php echo e($Employee->designation->title); ?></td>
                        <td><?php echo e($Employee->contact); ?></td>
                        <td><?php echo e($Employee->address); ?></td>
                        <td><img width="50px" src="<?php echo e(asset('storage/Employee/Photo/'.$Employee->photo)); ?>"/></td>
                        <td><img width="50px" src="<?php echo e(asset('storage/Employee/Proof/'.$Employee->idproof)); ?>"/></td>
                        <td><?php echo e($Employee->narration); ?></td>                    
                       
                        <td><a href="<?php echo e(route('Employee.edit',$Employee->id)); ?>" class="btn btn-secondary"><i class="fa fa-edit"></i> Edit</a></td>   
                        <td><form method="POST" action="<?php echo e(route('Employee.destroy',$Employee->id)); ?>" Id="form-delete-<?php echo e($Employee->id); ?>">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('delete'); ?>
                            <button type="button" class="btn btn-danger"  onclick="
                            event.preventDefault();
                            if(confirm('Are you sure delete this'))
                            {
                                document.getElementById('form-delete-<?php echo e($Employee->id); ?>').submit();
                            }"><i class="fas fa-trash"></i> Delete</button></form>
                        </td>                     
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>
    </div>
    <div class="card-footer">
        <div class="d-flex justify-content-end font-weight-bold"><h5>Total:  <?php echo e($Employees->Count()); ?></h5></div>        
    </div>
</div>

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

<?php echo $__env->make('layouts.adminapp', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\comservice\resources\views/Employee/index.blade.php ENDPATH**/ ?>