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

<?php if(isset($message)): ?> 
<div class="message">
	<?php echo $message; ?>

</div>
<?php endif; ?>
<h2><?php echo $which; ?> Account Requests</h2>
<table>
    <tr>
        <th>Firstname</th><th>Lastname</th><th>Email</th>
		<th>Reason</th><th style="width:125px;">Created</th><th>Status</th>
		<th></th><th></th><th></th>
    </tr>
    <?php foreach($applications as $application): ?>
    <tr>
        <td><?php echo $application->firstname; ?></td>
        <td><?php echo $application->lastname; ?></td>
        <td><?php echo $application->email; ?></td>
        <td><?php echo $application->reason; ?></td>
        <td><?php echo $application->created_at; ?></td>
        <td><?php echo $application->status; ?></td>
        <td>
<?php if($application->status == "email verified"): ?>
	       <a href="<?php echo action('ApplicationController@approve', $application->id); ?>">Approve</a>
<?php endif; ?>
	    </td>
        <td>
<?php if($application->status == "email verified"): ?>
	       <a href="<?php echo action('ApplicationController@deny', $application->id); ?>">Deny</a>
<?php endif; ?>
	   </td>
        <td><a href="<?php echo action('ApplicationController@delete', $application->id); ?>">Delete</a></td>
    </tr>
    <?php endforeach; ?>
</table>
<p>
	<?php echo $applications->render(); ?>

<!--
<a href="<?php echo e(action('UserController@create')); ?>">Add a user</a>
-->

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