@foreach($permissions->groupBy('group_key') as $group => $groupPermissions)
{{ __('strings.roles.' . $group) }}
@foreach($groupPermissions as $perm)
@php
$per_found = null;
if( isset($role) ) {
$per_found = $role->hasPermissionTo($perm->name);
}
if( isset($user)) {
$per_found = $user->hasDirectPermission($perm->name);
}
@endphp
@endforeach