@foreach($menus->where('status','=','1')->orderBy('position','ASC')->get() as $menu) @if($menu->link_by == 'url')
  • @if($menu->icon != NULL || $menu->icon != '') @endif {{ $menu->title }} @if($menu->menu_tag == 1) @endif
  • @endif @if($menu->link_by == 'page')
  • @if($menu->icon != NULL || $menu->icon != '') @endif{{ $menu->title }} @if($menu->menu_tag == 1) @endif
  • @endif @if($menu->link_by == 'cat')
  • @if($menu->icon != NULL || $menu->icon != '') @endif {{ $menu->title }} @if($menu->menu_tag == 1) @endif @if($menu->show_cat_in_dropdown == 1 && $menu->linked_parent != NULL) @php $catarray = array(); foreach ($menu->linked_parent as $key => $parent) { $cat = App\Category::find($parent); if(isset($cat)){ array_push($catarray, ["cat" => $cat->id]); } if(isset($menu->linked_child)){ foreach ($menu->linked_child as $key => $child) { $subcat = App\Subcategory::find($child); if(isset($subcat) && $subcat->parent_cat == $parent){ $newdata = array ( "sub" => $subcat->id, ); array_push($catarray, $newdata); $newdata2 = array ( 'detail' => strip_tags($subcat->description) ); array_push($catarray, $newdata2); } } } } $counter = 0; $slCount = count($catarray)/18; $whole = floor($slCount); $floor = fmod($slCount, 1); if($floor > 0){ $slCount = $whole + 1; }else{ $slCount = $whole; } $last = -1; @endphp
    @for($i=0;$i<$slCount;$i++) @php $counter = 0; @endphp
    @foreach ($catarray as $key => $a) @if($counter < 18) @if($last <= $key) @foreach ($a as $key2 => $b) @if($key2 == 'cat')

    @php $cat = App\Category::find($b); $category_id = $b; @endphp {{ $cat['title'] }}  

    @elseif($key2 == 'sub') @if($counter == 0)
    @endif @else @if($counter == 0)
    @endif {{substr(strip_tags($b), 0, 30)}}{{strlen(strip_tags($b))>30 ? '...' : ""}}

    @endif @endforeach @php $counter ++; @endphp @else @endif @else @php $last = $key; @endphp @break @endif @endforeach
    @endfor
    @if($menu->show_image == 1 && $menu->bannerimage != '' && @file_get_contents(public_path().'/images/menu/'.$menu->bannerimage)) @endif
    @endif @if($menu->show_child_in_dropdown == 1 && $menu->linked_parent != NULL) @php $catarray = array(); foreach ($menu->linked_parent as $key => $parent) { $cat = App\Subcategory::find($parent); if(isset($cat)){ array_push($catarray, ["cat" => $cat->id]); } if(isset($menu->linked_child)){ foreach ($menu->linked_child as $key => $child) { $subcat = App\Grandcategory::find($child); if(isset($subcat)){ if($subcat->subcat_id == $parent){ $newdata = array ( "sub" => $subcat->id, ); array_push($catarray, $newdata); $newdata2 = array ( 'detail' => strip_tags($subcat->description) ); array_push($catarray, $newdata2); } } } } } $counter = 0; $slCount = count($catarray)/18; $whole = floor($slCount); $floor = fmod($slCount, 1); if($floor > 0){ $slCount = $whole + 1; }else{ $slCount = $whole; } $last = -1; @endphp
    @for($i=0;$i<$slCount;$i++) @php $counter = 0; @endphp
    @foreach ($catarray as $key => $a) @if($counter < 18) @if($last <= $key) @foreach ($a as $key2 => $b) @if($key2 == 'cat')

    @php $subcat = App\Subcategory::find($b); $subcateid = $b; @endphp {{ $subcat['title'] }}

    @elseif($key2 == 'sub') @if($counter == 0)
    @endif @else @if($counter == 0)
    @endif {{substr(strip_tags($b), 0, 30)}}{{strlen(strip_tags($b))>30 ? '...' : ""}}

    @endif @endforeach @php $counter ++; @endphp @else @endif @else @php $last = $key; @endphp @break @endif @endforeach
    @endfor
    @if($menu->show_image == 1 && $menu->bannerimage != '' && @file_get_contents(public_path().'/images/menu/'.$menu->bannerimage)) @endif
    @endif
  • @endif @endforeach