Complete task 5

This commit is contained in:
Thuan Bui
2025-04-03 10:37:47 +09:00
parent 4b534fd9d5
commit 03db7feece
8 changed files with 1511 additions and 1192 deletions
+8 -8
View File
@@ -20,14 +20,14 @@
</thead>
<tbody>
@foreach ($users as $user)
{{-- Task: only every second row should have "bg-red-100" --}}
<tr class="bg-red-100">
<td>{{-- Task: add row number here: 1, 2, etc. --}}</td>
<td>{{ $user->name }}</td>
{{-- Task: only the FIRST row should have email with "font-bold" --}}
<td class="font-bold">{{ $user->email }}</td>
<td>{{ $user->created_at }}</td>
</tr>
{{-- Task: only every second row should have "bg-red-100" --}}
<tr class="{{ $loop->iteration % 2 == 0 ? 'bg-red-100' : ''}}">
<td>{{ $loop->iteration}}</td>
<td>{{ $user->name }}</td>
{{-- Task: only the FIRST row should have email with "font-bold" --}}
<td class="{{ $loop->iteration == 1 ? 'font-bold' : '' }}">{{ $user->email }}</td>
<td>{{ $user->created_at }}</td>
</tr>
@endforeach
</tbody>
</table>