<!Doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>Asesoritech</title>
	<link rel="stylesheet" href="<?php echo e(asset('bootstrap/css/bootstrap.css')); ?>">
	<script  src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
	<link  media="all" rel="stylesheet" type="text/css" href="<?php echo e(asset('css/mensajes.css')); ?>">
	<link rel="stylesheet" href="<?php echo e(asset('css/nav-style.css')); ?>">
	<script src="<?php echo e(asset('fontawesome-5.1.0/js/all.js')); ?>"></script>
	<link rel="stylesheet" href="<?php echo e(asset('fontawesome-5.1.0/css/all.css')); ?>">
</head>
<body>
	<nav class="navbar navbar-expand-lg fixed-top navbar-light bg-light">
	  <a class="navbar-brand" href="./"><img class="img-logo" src="../img/logo5.png"></a>
	  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
			<span class="navbar-toggler-icon"></span>
	  </button>
	  <div class="collapse navbar-collapse" id="navbarSupportedContent">
			<ul class="navbar-nav mr-auto">
				<li class="nav-item">
					<a class="nav-link" href="/admin">Admin</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/users">Users</a>
				</li>
			</ul>
	  </div>
	  <div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
		<ul class="navbar-nav ml-auto">
			<li class="nav-item">
				<a class="nav-link" href="<?php echo e(route('logout')); ?>" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
					<?php echo e(__('Logout')); ?>

				</a>
			</li>
				<form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" style="display: none;">
								<?php echo csrf_field(); ?>
				</form>
            </li>
        </ul>
      </div>
    </nav>
    <section class="container mensaje-container">
        <strong>Lista de mensajes</strong>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>Nombre</th>
                <th>Mail</th>
                <th>Mensaje</th>
                <th>Fecha</th>
                <th>Accion</th>
            </tr>
            </thead>
            <tbody>
                 <?php $__currentLoopData = $mensajes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mensajes): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr class="href-container" style="position:relative">
                        <td><?php echo e($mensajes->nombre); ?></td>
                        <td><?php echo e($mensajes->correo); ?></td>
                        <td> <?php echo e(substr($mensajes->mensaje, 0, 30)); ?></td>
                        <td><?php echo e($mensajes->created_at); ?></td>
                        <td>     
                            <a role="button" class="btn btn-success" href="ver-mensaje/<?php echo e($mensajes->id); ?>">ver mensaje</a>       
						</td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </section>
	<script src="<?php echo e(asset('js/mensajes/mensajes.js')); ?>"></script>
	<script src="<?php echo e(asset('js/sweetalert.min.js')); ?>"></script>
</body>
</html>