@if ($errors->any()) @endif
Edit Role: {{ $role->name }}
@csrf @method('PUT')
name === 'Admin' ? 'readonly' : '' }}> @if($role->name === 'Admin')
The name of the core Admin role cannot be modified.
@endif
@if($role->name === 'Admin')
The Admin role has all system permissions by default. Modifying permissions here is disabled.
@endif @foreach($groupedPermissions as $module => $permissions)
{{ $module }} Module
@foreach($permissions as $permission)
name === 'Admin' ? 'checked disabled' : '' }} {{ !$errors->any() && in_array($permission->name, $rolePermissions) ? 'checked' : '' }} {{ $errors->any() && is_array(old('permissions')) && in_array($permission->name, old('permissions')) ? 'checked' : '' }}>
@endforeach
@endforeach