@php
$currentPermissions = old('permissions', $role->permissions ?? []);
$hasWildcard = in_array('*', $currentPermissions);
@endphp
@if($hasWildcard)
This role currently has the wildcard * permission (full access). Saving without checking individual boxes will remove full access — check "Select All" first if you want to keep it as individual permissions, or leave as-is to preserve full access only if untouched.
@endif
@foreach($permissionGroups as $groupName => $permissions)
@foreach($permissions as $key => $label)
@endforeach
@endforeach