@csrf
@php // Group permissions by module $groupedPermissions = $permissions->groupBy('module.name'); @endphp @forelse($groupedPermissions as $moduleName => $modulePermissions)
{{$moduleName}}
@forelse($modulePermissions as $permission)
id, old('permissions', $role->permissions->pluck('id')->toArray()))) checked @endif >
@empty
  • No permissions available for this module.
  • @endforelse @empty

    No modules available.

    @endforelse