Name
Group
Username
Password
@foreach($pageStudents as $student)
@php
$nameParts = preg_split('/\s+/', trim($student['name']));
$firstName = $nameParts[0] ?? '';
$formattedName = $firstName;
if (count($nameParts) > 1) {
$lastName = $nameParts[count($nameParts) - 1] ?? '';
if (!empty($lastName)) {
$formattedName .= ' ' . strtoupper(substr($lastName, 0, 1)) . '.';
}
}
@endphp
| {{ $formattedName }} |
{{ $student['group'] }} |
{{ $student['username'] }} |
{{ $student['password'] }} |
@endforeach
@php
$emptyRows = $rowsPerPage - count($pageStudents);
@endphp
@for($i = 0; $i < $emptyRows; $i++)
| |
|
|
|
@endfor
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