@foreach ($data as $key => $menu)
@if($menu['level'] == 4)
@php
$level_4[]=$menu;
@endphp
@endif
@if($menu['level'] == 1)
@if($key>0)
@if($data[$key-1]['id'] == $active_menu['routeName'])
@php
$last = "last";
@endphp
@else
@php
$last = "tab1";
$l = "";
@endphp
@endif
@endif
@if($data[$key+1]['level'] == 2)
@php
$l = "loot";
@endphp
@endif
@if($menu['status'] == 1)
@php
$image=$menu['icon'];
if($menu['id'] == $active_menu['routeName'])
{
$image='white-'.$menu['icon'];
}
@endphp
@else
@endif
@endif
@php
$last = "tab1";
@endphp
@endforeach
@foreach ($data as $key => $menu)
@if($menu['level'] == 1)
@endif
@endforeach
@foreach ($data as $key => $sub_menu)
@php
if($sub_menu['level'] == 1){
$menu_id = $sub_menu['id'];
}
@endphp
@if($sub_menu['level'] == 2)
@php
Session::put('level_4',$level_4);
Session::save();
@endphp
@endif
@endforeach