@php
$rolePermissions = \Spatie\Permission\Models\Permission::join('role_has_permissions', 'role_has_permissions.permission_id', '=', 'permissions.id')
->where('role_has_permissions.role_id', $item->id)
->get();
@endphp
@if (!empty($rolePermissions))
@foreach ($rolePermissions as $v)
@endforeach
@endif