role listing
This commit is contained in:
34
resources/views/roles/_table.blade.php
Normal file
34
resources/views/roles/_table.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<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">{{ __('Description') }}</th>
|
||||
<th class="px-6 py-3">{{ __('Created') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($roles as $role)
|
||||
<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">{{ $roles->firstItem() + $loop->index }}</td>
|
||||
<td class="px-6 py-4 font-medium">{{ $role->name }}</td>
|
||||
<td class="px-6 py-4">{{ $role->description ?? '—' }}</td>
|
||||
<td class="px-6 py-4">{{ $role->created_at->format('d M Y') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@if ($roles->isEmpty())
|
||||
<tr>
|
||||
<td colspan="4" class="px-6 py-4 text-center text-gray-500 dark:text-gray-400">
|
||||
{{ __('No roles found.') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@if ($roles->hasPages())
|
||||
<div class="mt-4">
|
||||
{{ $roles->links() }}
|
||||
</div>
|
||||
@endif
|
||||
Reference in New Issue
Block a user