@extends('master') @section('title', 'Menu Item List') @section('breadcrumbMainTitle', 'Menu Item List') @section('page_css') @endsection @section('content')

@include('menu.menuItem.modal.addMenuItemModal')
    @foreach ($menuItems as $menuItem) @if ($menuItem->type == 'divider')
  1. Divider: {{ $menuItem?->menu_item_name }}
  2. @else @if (empty($menuItem?->parent_id) && !empty($menuItem?->url) && $menuItem?->type === 'menu_item')
  3. Menu: {{ $menuItem?->menu_item_name }}
  4. @else @if (empty($menuItem?->parent_id) && empty($menuItem?->url) && $menuItem?->type === 'menu_item')
  5. Parent: {{ $menuItem?->menu_item_name }}
      @foreach ($childDatas as $childData) @if ($menuItem?->menu_item_id == $childData?->parent_id && $menuItem?->type === 'menu_item') @if (!empty($childData?->parent_id) && !empty($childData?->url) && $childData?->type === 'menu_item')
    1. Child: {{ $childData?->menu_item_name }}
    2. @else @if (!empty($childData?->parent_id) && empty($childData?->url) && $childData?->type === 'menu_item')
    3. Child: {{ $childData?->menu_item_name }}
        @foreach ($grandChildDatas as $grandChildData) @if ($childData?->menu_item_id == $grandChildData?->parent_id && $childData?->type === 'menu_item')
      1. Grand Child: {{ $grandChildData?->menu_item_name }}
      2. @endif @endforeach
    4. @endif @endif @endif @endforeach
  6. @else @endif @endif @endif @endforeach
@endsection @section('page_script') @endsection