{{ $menu->menu_name }}

@if (session('status')) @endif @if ($canCreate || $editingUser)

{{ $editingUser ? 'แก้ไขข้อมูล' : 'แบบฟอร์มการบันทึกข้อมูล' }}

@if ($editingUser) @method('PUT') @endif @csrf
@if ($editingUser) ยกเลิก @endif
@endif

รายการ

@if ($canEdit || $canDelete) @endif @foreach ($users as $user) @if ($canEdit || $canDelete) @endif @endforeach
ลำดับ ชื่อ ชื่อผู้ใช้ อีเมล บทบาท สถานะจัดการ
{{ $user->id }} {{ $user->name }} {{ $user->username }} {{ $user->email }} {{ $user->role?->role_name }} @if ($canEdit && ! $user->is(auth()->user()))
@csrf @method('PATCH')
@else {{ $user->status ? 'เปิดใช้งาน' : 'ปิดใช้งาน' }} @endif
@if ($canEdit) @include('shell.icons.pencil') @endif @if ($canDelete && ! $user->is(auth()->user()))
@csrf @method('DELETE')
@endif
@if ($users->isEmpty())

{{ $search !== '' ? 'ไม่พบรายการที่ค้นหา' : 'ยังไม่มีข้อมูล' }}

@endif @include('shell.partials.pagination', ['paginator' => $users])
@if ($errors->any()) @endif