<div class="box-body no-padding">
    <table class="table table-striped">
        <?php if(count($logs) > 0): ?>
            <tr>
                <th>#</th>
                <th>المستخدم</th>
                <th>الموديل</th>
                <th>البيان</th>
                <th>التاريخ</th>
            </tr>

        <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php
                $model = $log->subject;
            ?>
            <tr>
                <td><?php echo e($loop->iteration); ?></td>
                <td><?php echo e(optional($log->causer)->name); ?></td>
                <td><?php echo e(trans("front.".$log->model_name)); ?> </td>
                <td><?php echo e($log->description); ?></td>
                <td>
                    <?php echo $log->listAttributes('attributes'); ?>

                </td>
                <td>
                    <?php echo $log->listAttributes('old'); ?>

                </td>
                <td><?php echo e($log->created_at->diffForHumans()); ?></td>

            </tr>

        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php else: ?>
            <tr>
                <th>لا توجد سجلات حتى الان</th>
            </tr>
        <?php endif; ?>
    </table>
</div>
<div class="row text-center">
    <div class="col-sm-4"></div>
    <div class="col-sm-8"><?php echo e($logs->appends(request()->except('page'))->links()); ?></div>
</div>

<?php $__env->startPush('js'); ?>
    <script>
        $(document).on('click','.showAttributesData',function () {
            $(this).next('.attributesData').fadeIn('fast');
            $(this).replaceWith('<button class="btn btn-success hideAttributesData">Hide Details</button>');
        });
        $(document).on('click','.hideAttributesData',function () {
            $(this).next('.attributesData').fadeOut('fast');
            $(this).replaceWith('<button class="btn btn-success showAttributesData">Show Details</button>');
        });
    </script>
<?php $__env->stopPush(); ?>
