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

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

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

    <h1><i class="fa fa-users"></i> Admin Dashboard <?php /* <a href="/logout" class="btn btn-default pull-right">Logout</a> */ ?></h1>

    <a href="admin/building" >Building Administration</a>

    <?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>Days</th>
                    <th>Date/Time Added</th>
                </tr>
            </thead>

            <tbody>
                <?php foreach(ParkingRequest::where('building_id', '=', $building->id)->get() as $p): ?>
                <tr>
                    <td><?php echo $p->license_plate; ?></td>
                    <td><?php echo $p->make; ?></td>
                    <td><?php echo $p->model; ?></td>
                    <td><?php echo $p->colour; ?></td>
                    <td><?php echo $p->days; ?></td>
                    <td><?php echo $p->created_at->format('F d, Y h:ia'); ?></td>
                </tr>
                <?php endforeach; ?>
            </tbody>

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

</div>

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

<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>