@php $studentsPerPage = 18; // Number of students per table page $studentChunks = collect($students)->chunk($studentsPerPage); @endphp @foreach($studentChunks as $pageIndex => $pageStudents) @if($pageIndex > 0)
@endif
Student Credentials
@foreach($pageStudents as $student) @endforeach
Name Group Username Password
{{ $student['name'] }} {{ $student['group'] }} {{ $student['username'] }} {{ $student['password'] }}
Note: If you have a global password set, it has replaced the unique password for all students above—unless this setting is disabled within a student's account profile.
@endforeach
@php $studentsArray = collect($students)->values()->all(); $totalStudents = count($studentsArray); $totalPages = max(1, ceil($totalStudents / 8)); @endphp @for($pageIndex = 0; $pageIndex < $totalPages; $pageIndex++) @if($pageIndex > 0)
@endif
@for($rowIndex = 0; $rowIndex < 4; $rowIndex++)
@for($colIndex = 0; $colIndex < 2; $colIndex++) @php $cardPosition = ($pageIndex * 8) + ($rowIndex * 2) + $colIndex; $student = $cardPosition < $totalStudents ? $studentsArray[$cardPosition] : null; @endphp @if($student)
Readingful Logo
{{ $student['first_name'] }} {{ $student['last_name'] }}.
Username: {{ $student['username'] }}
Password: {{ $student['password'] }}
https://www.readingful.com
@else
 
@endif @endfor
@endfor
@endfor