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

<div class="row">
    <div class="col-md-12">
        <div class="card shadow-sm mb-4">
            <div class="card-header d-flex py-3">
                <h4 class="m-0 font-weight-bold text-success">Contact us</h4>
            </div>
            <div class="col-11 mr-auto">
                <?php echo $__env->make('partials.backend.filter', ['model' => route('admin.contacts.index')], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            </div>
            <div class="table-responsive">
                <table class="table table-content table-hover">
                    <thead>
                        <tr>
                            <th>From</th>
                            <th>Title</th>
                            <th>Status</th>
                            <th>Create at</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $contacts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $contact): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td><a href="<?php echo e(route('admin.contacts.show', $contact->id)); ?>"><?php echo e($contact->name); ?></a></td>
                                <td><?php echo e($contact->title); ?></td>
                                <td><?php echo e($contact->status()); ?></td>
                                <td><?php echo e($contact->created_at->format('d-m-Y')); ?></td>
                                <td>
                                    <div class="btn-group btn-group-toggle">
                                        <a href="<?php echo e(route('admin.contacts.show', $contact->id)); ?>" title="Show" class="btn-primary btn btn-sm"><i class="fa fa-eye"></i></a>
                                        <a href="javascript:void(0);" onclick="if (confirm('Are You sure want to Delete?'))
                                            { document.getElementById('contact-delete-<?php echo e($contact->id); ?>').submit(); } else { return false; }"
                                           title="Delete" class="btn-danger btn btn-sm"><i class="fa fa-trash"></i>
                                        </a>
                                        <form action="<?php echo e(route('admin.contacts.destroy', $contact->id)); ?>" method="post" id="contact-delete-<?php echo e($contact->id); ?>">
                                            <?php echo csrf_field(); ?>
                                            <?php echo method_field('DELETE'); ?>
                                        </form>
                                    </div>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="5" class="text-center">No contacts found.</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                    <tfoot>
                    <tr>
                        <th colspan="5">
                            <div class="float-right">
                            <?php echo $contacts->appends(request()->all())->links(); ?>

                            </div>
                        </th>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
</div>

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

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/lekruu/public_html/resources/views/backend/contacts/index.blade.php ENDPATH**/ ?>