@if ($errors->has('permissions.*'))
@endif
@foreach($permissions as $category)
@foreach($category['permissions'] as $permission)
{{-- Conditionally check if the permission exists in the customer's permissions --}}
@if(is_array($existing_permission) && in_array($permission['name'], $existing_permission))
@endif
@endforeach
@endforeach