@php($i=0) @foreach($permissions as $key => $permission) @if(is_array($permission))
@php($i++) @endif @endforeach