@php
// Group permissions by module
$groupedPermissions = $permissions->groupBy('module.name');
@endphp
@forelse($groupedPermissions as $moduleName => $modulePermissions)
{{$moduleName}}
@forelse($modulePermissions as $permission)
@empty
No permissions available for this module.
@endforelse
@empty
No modules available.