<?php $__env->startSection('title', 'Activity Logs - Social Scheduler'); ?>

<?php $__env->startSection('content'); ?>
<div class="topbar">
    <h4 class="mb-0 fw-bold"><i class="bi bi-journal-text me-2 text-primary"></i>Activity Logs</h4>
    <a href="<?php echo e(route('admin.dashboard')); ?>" class="btn btn-outline-secondary">
        <i class="bi bi-arrow-left me-1"></i> Back to Admin
    </a>
</div>

<div class="card">
    <div class="card-body p-0">
        <div class="table-responsive">
            <table class="table table-hover mb-0">
                <thead class="table-light">
                    <tr>
                        <th>ID</th>
                        <th>User</th>
                        <th>Action</th>
                        <th>Description</th>
                        <th>Model</th>
                        <th>IP Address</th>
                        <th>Time</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($log->id); ?></td>
                        <td><?php echo e($log->user ? $log->user->name : 'System'); ?></td>
                        <td>
                            <span class="badge bg-secondary"><?php echo e($log->action); ?></span>
                        </td>
                        <td><?php echo e($log->description); ?></td>
                        <td>
                            <?php if($log->model_type): ?>
                                <?php echo e(class_basename($log->model_type)); ?> #<?php echo e($log->model_id); ?>

                            <?php else: ?>
                                —
                            <?php endif; ?>
                        </td>
                        <td class="font-monospace" style="font-size: 0.8rem;"><?php echo e($log->ip_address); ?></td>
                        <td class="text-muted" style="font-size: 0.875rem;"><?php echo e($log->created_at->format('M d, Y H:i:s')); ?></td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>
        <div class="p-3">
            <?php echo e($logs->links()); ?>

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

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/polyttfr/public_html/resources/views/admin/logs.blade.php ENDPATH**/ ?>