<?php $__env->startSection('title'); ?>
	List of Games
<?php $__env->stopSection(); ?>

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

<h1>List of Games</h1>

<?php if($query): ?>
	<h2>You searched for <?php echo e($query); ?></h2>
<?php endif; ?>

<?php if(sizeof($games) == 0): ?>
	No results
<?php else: ?>
	<?php foreach($user->games as $game): ?>
		<section class='game'>
			<h2><?php echo $game['title']; ?></h2>
			<ul>
				<li>Title: <?php echo $game['title']; ?></li>
				<li>Franchise: <?php echo $game['franchise']; ?></li>
				<li>Genre: <?php echo $game['genre']; ?></li>

				<li>Status: <?php echo $game->users()->first()->pivot->status; ?></li>
				<li>Progress: <?php echo $game->users()->first()->pivot->progress; ?></li>
				<li>Currently Playing? <?php echo $game->users()->first()->pivot->currently_playing; ?></li>
				<li>Rating: <?php echo $game->users()->first()->pivot->rating; ?></li>
				<li>Additional Notes: <?php echo $game->users()->first()->pivot->notes; ?></li>
				
			</ul>

			<p>
				<a href='/game/edit/<?php echo $game['id']; ?>'>Edit</a>
			</p>
		</section>
	<?php endforeach; ?>
<?php endif; ?>

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