@extends('layouts.app') @section('title', 'Edit Role') @section('breadcrumb') @endsection @section('content')
@csrf @method('PUT')
Informasi Role
@if($role->is_system)
Role sistem tidak dapat diubah namanya
@else @error('name')
{{ $message }}
@enderror @endif
@error('label')
{{ $message }}
@enderror
Statistik
Jumlah User: {{ $role->users()->count() }}
Total Permission: {{ count($role->permissions ?? []) }}
Hak Akses per Modul & Aksi
@php $allActions = ['index','create','show','edit','destroy']; $currentPerms = old('permissions', $role->permissions ?? []); @endphp @foreach($modules as $key => $module) @if(empty($module['actions'])) @continue @endif @foreach($allActions as $action) @endforeach @endforeach
Modul Lihat Tambah Detail Edit Hapus Semua
{{ $module['label'] }} @if(in_array($action, $module['actions'])) @else @endif
Batal
@endsection @section('scripts') @endsection