

<?php $__env->startSection('title'); ?>
Users
<?php $__env->stopSection(); ?>

<?php $__env->startSection('meta'); ?>
<meta property="og:title" content="<?php echo e(config('app.name')); ?> - Users" />
<meta property="og:type" content="website" />
<meta property="og:url" content="<?php echo e(url()->current()); ?>" />
<meta property="og:image" content="/images/tadaht.png" />
<meta property="og:description" content="Take a look at all of the <?php echo e(config('app.name')); ?> community members." />
<meta name="theme-color" content="#0000FF">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="container">
    <form method="get">
        <div class="input-group">
            <input class="form-control" type="search" placeholder="Username" name="search" aria-label="Search">
            <span class="input-group-append"><button class="btn btn-outline-primary" type="submit"><i class="fas fa-search"></i></button></span>
        </div>
    </form>

    <?php if($users->count() > 0): ?>
        <table class="mt-3 table">
            <thead>
                <th scope="col" style="width: 10%">Character</th>
                <th scope="col" style="width: 10%">Name</th>
                <th scope="col" style="width: 5%">Online</th>
                <th scope="col" style="width: 60%">Blurb</th>
                <th scope="col" style="width: 15%">Last Online</th>
            </thead>
            <tbody>
                <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td class="align-middle"><img class="img-responsive" style="object-fit: contain;" width=50 height=50 src="<?php echo e(route('users.thumbnail', $user->id)); ?>" alt="<?php echo e($user->username); ?>"></td>
                        <td class="align-middle"><a <?php if($user->admin): ?> class="text-danger" <?php endif; ?> href="<?php echo e(route('users.profile', $user->id)); ?>"><?php echo e($user->username); ?></a></td>
                        <?php if(Cache::has('last_online' . $user->id)): ?>
                            <td class="align-middle text-success"><small><img src="/images/site/online.png" width="5" height="5" alt="Online"><b> Online</b></small></td>
                        <?php else: ?>
                            <td class="align-middle text-muted"><small><img src="/images/site/offline.png" width="5" height="5" alt="Offline"> Offline</small></td>
                        <?php endif; ?>
                        <td class="align-middle text-truncate" style="max-width: 75ch"><small><?php echo e($user->blurb); ?></small></td>
                        <td class="align-middle text-muted"><?php echo e($user->last_online->diffForHumans()); ?></td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    <?php else: ?>
        <div class="text-center">
            <h2>Nothing found</h2>
            <p>Looks like there are no users to display for this query.</p>
        </div>
    <?php endif; ?>

    <div class="d-flex justify-content-center">
        <?php echo e($users->links('pagination::bootstrap-4')); ?>

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

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