@php $menuItem = \App\Models\MenuItem::where('enabled', '1') //->with(['menu', 'projectCategory', 'serviceCategory', 'corporate', 'faqCategory', 'dynamicPage']) ->tree() ->whereHas('menu', function ($query) use ($placement) { $query->where('placement', '=', $placement)->where('enabled','1'); }) ->orderby('order_column') ->get() ->makeHidden(['resource_url']) ->toTree(); //optional available variables $ulRoot ??= null; $liRoot ??= null; $liRootLoop ??= null; $aRoot ??= null; $aRootLoop ??= null; $iconRoot ??= null; $ulSub ??= null; $liSub ??= null; $liSubLoop ??= null; $aSub ??= null; $aSubLoop ??= null; $iconSub ??= null; $ulSubNested ??= null; @endphp @foreach($menuItem as $category) @if($category->front_route_url) @if(count($category->children))
  • {{ $category->name }} @if($category->icon ?? '')icon])>@endif
    @if(count($category->children)) @include('themes.'.config('smartekcms.themes.frontend').'.layouts.menus.menuChild',['children' => $category->children]) @endif
  • @else
  • {{ $category->name }} @if($category->icon ?? '')icon])>@endif
  • @endif @endif @endforeach