mirror of
https://github.com/10h30/Test-Laravel-Blade-Basics.git
synced 2026-07-17 21:53:45 +09:00
Complete task 5
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user