@extends('layouts.app') @section('title', 'Manajemen Peran') @section('breadcrumb')

Manajemen Peran

Pilih peran untuk melihat atau mengatur aksesnya.

@endsection @section('content') @error ('role') @enderror
Daftar peran

{{ $roles->total() }} peran terdaftar

@canRoute ('roles.create') Tambah Peran @endcanRoute
@include('partials.tables.filters', ['paginator' => $roles, 'tableFilters' => ['sort', 'direction']]) @forelse ($roles as $role) @php $protected = in_array($role->name, ['Superadmin', 'Patient', 'patient'], true); @endphp @empty @endforelse
No. @include('partials.tables.sort_link', ['column' => 'name', 'label' => 'Nama Peran']) Pengguna Aksi
{{ $roles->firstItem() + $loop->index }} {{ ucfirst($role->name) }} @if ($role->users->isEmpty()) — @else
    @foreach ($role->users as $user)
  • {{ $user->name }}
  • @endforeach
@endif
@if ($role->name !== 'Superadmin') @endif @if (!$protected && $role->users->isEmpty())
@csrf @method ('DELETE')
@endif
Tidak ada data yang cocok dengan pencarian.
{{ $roles->links('partials.tables.pagination') }}
@endsection @push('scripts') @endpush