Files
kelas-taming/resources/views/users/_table.blade.php
2026-05-11 14:13:25 +08:00

41 lines
1.6 KiB
PHP

<table class="w-full text-sm text-left text-gray-900 dark:text-gray-100">
<thead class="text-xs text-gray-700 dark:text-gray-400 uppercase bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3">#</th>
<th class="px-6 py-3">{{ __('Name') }}</th>
<th class="px-6 py-3">{{ __('Email') }}</th>
<th class="px-6 py-3">{{ __('Joined') }}</th>
<th class="px-6 py-3"></th>
</tr>
</thead>
<tbody>
@foreach ($users as $user)
<tr class="{{ $loop->even ? 'bg-gray-50 dark:bg-gray-700' : 'bg-white dark:bg-gray-800' }} border-b border-gray-200 dark:border-gray-600">
<td class="px-6 py-4">{{ $users->firstItem() + $loop->index }}</td>
<td class="px-6 py-4 font-medium">{{ $user->name }}</td>
<td class="px-6 py-4">{{ $user->email }}</td>
<td class="px-6 py-4">{{ $user->created_at->format('d M Y') }}</td>
<td class="px-6 py-4 text-right">
<a href="{{ route('users.edit', $user) }}" class="text-indigo-600 dark:text-indigo-400 hover:underline text-sm font-medium">
{{ __('Edit') }}
</a>
</td>
</tr>
@endforeach
@if ($users->isEmpty())
<tr>
<td colspan="5" class="px-6 py-4 text-center text-gray-500 dark:text-gray-400">
{{ __('No users found.') }}
</td>
</tr>
@endif
</tbody>
</table>
@if ($users->hasPages())
<div class="mt-4">
{{ $users->links() }}
</div>
@endif