{{--
--}}
Halaman Admin
{{--
Setting
Menu
Role Users
--}} @php $role_id = Auth::user()->id; // tingkat pertama $menu = \App\Models\M_Menu::with('role') ->whereHas('role', function ($query) use ($role_id){ $query->where('role_id', $role_id); }) ->orderBy(\DB::Raw("menu_order::int"),'asc') ->get(); @endphp @foreach($menu as $m) @if($m->menu_parent == 0 && $m->menu_url == '#')
{{$m->menu_name}}
@php //tingkat kedua $sub = \App\Models\M_Menu::with('role') ->whereHas('role', function ($query) use ($role_id){ $query->where('role_id',$role_id); }) ->orderBy(\DB::Raw("menu_order::int"),'asc') ->where('menu_parent',$m->menu_id) ->get(); @endphp @if(!empty($sub))
@foreach ($sub as $value) @if($value->menu_url == '#')
{{$value->menu_name}}
@else
menu_url) ? 'class=active' : '' }}>
{{$value->menu_name}}
@endif @endforeach
@endif
@elseif($m->menu_parent == 0 && $m->menu_url != '#')
menu_url) ? 'class=active' : '' }}>
{{$m->menu_name}}
@endif @endforeach
{{Auth::user()->name}}
{{Auth::user()->email}}
Logout
@csrf
Change Password
@yield('content')
@include('layouts.modal')
{{-- --}} @yield('content_js') @yield('js') @include('layouts.js_public')