@php
$menuItems = [
['name' => 'Hosting', 'hasDropdown' => true],
['name' => 'Servers', 'hasDropdown' => true],
['name' => 'Forex Servers', 'hasDropdown' => false, 'link' => '/forex-servers'],
['name' => 'Proxy Servers', 'hasDropdown' => false, 'link' => '/proxy-servers'],
['name' => 'Bulk Email', 'hasDropdown' => false, 'link' => '/bulk-email'],
['name' => 'Google Workspace', 'hasDropdown' => false, 'link' => '/google-workspace'],
['name' => 'Microsoft 365', 'hasDropdown' => false, 'link' => '/microsoft-365'],
['name' => 'LICENSE', 'hasDropdown' => false, 'link' => '/license'],
['name' => 'About us', 'hasDropdown' => false, 'link' => '/about-us'],
];
$dropdownContent = [
'Hosting' => [
['name' => 'Shared Hosting', 'link' => '/shared-hosting'],
['name' => 'Reseller Hosting', 'link' => '/reseller-hosting'],
['name' => 'Python', 'link' => '/python-hosting'],
],
'Servers' => [
[
'name' => 'Dedicated Servers',
'hasSubMenu' => true,
'subItems' => [
['name' => 'India', 'link' => '/dedicatedserver/india'],
['name' => 'Foreign', 'link' => '/dedicatedserver/foreign'],
],
],
[
'name' => 'VPS',
'hasSubMenu' => true,
'subItems' => [
['name' => 'India', 'link' => '/vps/india'],
['name' => 'Foreign', 'link' => '/vps/foreign'],
],
],
[
'name' => 'Cloud Servers',
'hasSubMenu' => true,
'subItems' => [
['name' => 'India', 'link' => '/cloud/india'],
['name' => 'Foreign', 'link' => '/cloud/foreign'],
],
],
],
];
@endphp
@foreach ($menuItems as $item)
@if (isset($item['link']) && !$item['hasDropdown'])
{{ $item['name'] }}
@else
{{-- Desktop Dropdown --}}
@if (isset($dropdownContent[$item['name']]))
@foreach ($dropdownContent[$item['name']] as $subItem)
@if (isset($subItem['hasSubMenu']) && $subItem['hasSubMenu'])
@else
{{ $subItem['name'] }}
@endif
@endforeach
@endif
@endif
@endforeach