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

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

<div class="col-lg-10 col-lg-offset-1">

    <h1><i class="fa fa-users"></i> Security Dashboard</h1>

    <?php if($buildings->isEmpty()): ?>
    <h3>No Buildings</h3>
    <?php else: ?>
    <?php foreach($buildings as $building): ?>
    <h3><?php echo $building->address; ?></h3>
    <div class="table-responsive">
        <table class="table table-bordered table-striped">

            <thead>
            <tr>
                <th>License Plate</th>
                <th>Make</th>
                <th>Model
                <th>Colour</th>
                <th>Nights</th>
                <th>Apartment</th>
                <th>Date/Time Added</th>
            </tr>
            </thead>

            <tbody>
            <?php foreach($building->parking_requests()->get() as $p): ?>
            <tr>
                <td><?php echo $p->car->license_plate; ?></td>
                <td><?php echo $p->car->make; ?></td>
                <td><?php echo $p->car->model; ?></td>
                <td><?php echo $p->car->colour; ?></td>
                <td><?php echo $p->nights; ?></td>
                <td><?php echo $p->tenant->apartment; ?></td>
                <td><?php echo $p->created_at->format('F d, Y h:ia'); ?></td>
            </tr>
            <?php endforeach; ?>
            </tbody>

        </table>
    </div>
    <?php endforeach; ?>
    <?php endif; ?>

</div>

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