Skip to content

Integracion en blade

@php
$headerQuery = rk_navigation()
->newQuery()
->loadContexts(['headerDashboard'])
->filterForPermissions($permissions);
$headerItems = $headerQuery->get();
$activeNode = $headerQuery->getActiveNodeParentWithChildren();
@endphp
@foreach ($headerItems as $item)
@if ($item->isGroup())
<div class="group">
<h3>{{ $item->getLabel() }}</h3>
@foreach ($item->getItems() as $child)
<a href="{{ $child->getUrl() }}">{{ $child->getLabel() }}</a>
@endforeach
</div>
@else
<a href="{{ $item->getUrl() }}">{{ $item->getLabel() }}</a>
@endif
@endforeach