<?php $__env->startSection('main_content'); ?>
<?php echo $__env->make('admin.layouts.nav', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php echo $__env->make('admin.layouts.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

<div class="main-content">
    <section class="section">
        <div class="section-header d-flex justify-content-between">
            <h1><?php echo e(__('Replies')); ?></h1>
        </div>
        <div class="section-body">
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <div class="card-body">
                            <div class="table-responsive">
                                <table class="table table-bordered" id="example1">
                                    <thead>
                                        <tr>
                                            <th><?php echo e(__('SL')); ?></th>
                                            <th><?php echo e(__('Reply')); ?></th>
                                            <th><?php echo e(__('Comment')); ?></th>
                                            <th><?php echo e(__('Post')); ?></th>
                                            <th><?php echo e(__('Name')); ?></th>
                                            <th><?php echo e(__('Email')); ?></th>
                                            <th><?php echo e(__('User Type')); ?></th>
                                            <th><?php echo e(__('Status')); ?></th>
                                            <th><?php echo e(__('Action')); ?></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $__currentLoopData = $replies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td><?php echo e($loop->iteration); ?></td>
                                            <td>
                                                <?php echo e($item->reply); ?>

                                            </td>
                                            <td>
                                                <?php echo e($item->comment->comment); ?>

                                            </td>
                                            <td>
                                                <?php
                                                $post_data = App\Models\Post::where('id',$item->comment->post_id)->first();
                                                ?>
                                                <?php echo e($post_data->title); ?><br>
                                                <a href="<?php echo e(route('post',$post_data->slug)); ?>"><?php echo e(__('See Post')); ?></a>
                                            </td>
                                            <td><?php echo e($item->name); ?></td>
                                            <td><?php echo e($item->email); ?></td>
                                            <td><?php echo e($item->user_type); ?></td>
                                            <td>
                                                <?php if($item->status == "Active"): ?>
                                                    <a href="<?php echo e(route('admin_reply_status_change',$item->id)); ?>" onClick="return confirm('Are you sure want to change the status?');"><span class="badge badge-success"><?php echo e(__('Active')); ?></span></a>
                                                <?php else: ?>
                                                    <a href="<?php echo e(route('admin_reply_status_change',$item->id)); ?>" onClick="return confirm('Are you sure want to change the status?');"><span class="badge badge-danger"><?php echo e(__('Pending')); ?></span></a>
                                                <?php endif; ?>
                                            <td class="pt_10 pb_10">
                                                <a href="<?php echo e(route('admin_reply_delete',$item->id)); ?>" class="btn btn-danger btn-sm" onClick="return confirm('Are you sure?');"><i class="fas fa-trash"></i></a>
                                            </td>
                                        </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/phpscriptpoint/lawyer/lawyer/cms/main_files/resources/views/admin/post/reply.blade.php ENDPATH**/ ?>