@php $current_route = Route::currentRouteName(); @endphp @if (isset($group_links) && is_array($group_links)) @if (isset($group_links['dropdown']) && count($group_links['dropdown']) > 0) @php $title_permission = false; $dropdown_items = []; @endphp @foreach ($group_links['dropdown'] as $key => $item) @if (isset($item['links']) && count($item['links']) > 0) @php $routes = Arr::pluck($item['links'],"route"); $access_permission = admin_permission_by_name_array($routes); if($access_permission == true) { $title_permission = true; $dropdown_items[] = [ 'title' => $item['title'], 'links' => $item['links'], 'routes' => $routes, 'icon' => $item['icon'] ?? "", ]; } @endphp @endif @endforeach @if ($title_permission === true)