@props(['categories', 'index' => 0]) @php $append = ''; if ($index) { for ($i = 0; $i < $index; $i++) { $append .= '   '; } $append .= ' ⇢ '; } $role_id = $logged_in_user?->roles->first()?->id; @endphp @foreach ($categories as $sc) @if ($logged_in_user?->hasRole('super')) @elseif ($sc->create_group && $role_id == $sc->create_group) @else @endif @if ($sc->children) {{-- --}} {{-- --}} @endif @endforeach