<table class="table">
	<thead>
	<tr>
		<th>Firstname</th>
		<th>Lastname</th>
		<th>Email</th>
		<th>Assigned Classes</th>
		<th>Parent Email</th>
	</tr>
	</thead>
	<tbody>
	<?php foreach($students as $student): ?>
		<tr>
			<td><?php echo e($student->first_name); ?></td>
			<td><?php echo e($student->last_name); ?></td>
			<td><?php echo e($student->email); ?></td>
			<td>
				<?php foreach($student->programs as $program): ?>
					<?php if(!empty($program)): ?>
						<?php echo e($program->name); ?> (<?php echo e($program->firstName . ' ' . $program->lastName); ?>) <br>
					<?php else: ?>
						<?php echo e(''); ?>

					<?php endif; ?>
				<?php endforeach; ?>
			</td>
			<td><?php echo e($student->p_email); ?></td>
		</tr>
	<?php endforeach; ?>
	</tbody>
</table>