mirror of
https://github.com/10h30/Test-Laravel-Blade-Basics.git
synced 2026-07-11 18:56:15 +09:00
45 lines
1.6 KiB
PHP
45 lines
1.6 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
|
{{ __('Users') }}
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
|
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
|
<div class="p-6 bg-white border-b border-gray-200">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Email</th>
|
|
<th>Registered at</th>
|
|
</tr>
|
|
</thead>
|
|
{{-- Task: add the loop here to show users, or the row "No content" --}}
|
|
@if (count($users) > 0)
|
|
@foreach ($users as $user )
|
|
<tbody>
|
|
<tr>
|
|
<td>{{ $user->name }}</td>
|
|
<td>{{ $user->email }}</td>
|
|
<td>{{ $user->created_at }}</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
@endforeach
|
|
@else
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="3">No content.</td>
|
|
</tr>
|
|
</tbody>
|
|
@endif
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|