role listing

This commit is contained in:
2026-05-11 11:41:27 +08:00
parent 5f361d0e39
commit 909c767e01
7 changed files with 133 additions and 0 deletions

View File

@@ -15,6 +15,9 @@
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
{{ __('Dashboard') }}
</x-nav-link>
<x-nav-link :href="route('role.index')" :active="request()->routeIs('role.index')">
{{ __('Roles') }}
</x-nav-link>
</div>
</div>
@@ -70,6 +73,9 @@
<x-responsive-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
{{ __('Dashboard') }}
</x-responsive-nav-link>
<x-responsive-nav-link :href="route('role.index')" :active="request()->routeIs('role.index')">
{{ __('Roles') }}
</x-responsive-nav-link>
</div>
<!-- Responsive Settings Options -->

View File

@@ -0,0 +1,42 @@
<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Roles') }}
</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 text-gray-900">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Created</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
@forelse ($roles as $role)
<tr class="odd:bg-white even:bg-gray-50">
<td class="px-4 py-3 text-sm text-gray-700">{{ $role->id }}</td>
<td class="px-4 py-3 text-sm text-gray-900">{{ $role->name }}</td>
<td class="px-4 py-3 text-sm text-gray-700">{{ $role->created_at?->format('Y-m-d H:i') }}</td>
</tr>
@empty
<tr>
<td colspan="3" class="px-4 py-6 text-center text-sm text-gray-500">
No roles found.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</x-app-layout>