@php $menuItems = [ 'admin' => [ ['route' => 'home', 'icon' => 'house', 'label' => 'Panel'], ], 'super_admin' => [ ['route' => 'superadmin.dashboard', 'icon' => 'house', 'label' => 'Panel'], ['route' => 'superadmin.users.index', 'icon' => 'user', 'label' => 'Usuarios'], ['route' => 'superadmin.template-variables.index', 'icon' => 'codebreak', 'label' => 'Variables'], ['route' => 'superadmin.section-rules.index', 'icon' => 'codebreak', 'label' => 'Controles - Reglas'], ['route' => 'superadmin.contract-template.index', 'icon' => 'document', 'label' => 'Plantillas de contrato'], ], ]; @endphp
@if(auth()->check()) @foreach(auth()->user()->roles as $role) @if(isset($menuItems[$role->name])) @foreach($menuItems[$role->name] as $item) {{ $item['label'] }} @endforeach @endif @endforeach @endif @auth @if(auth()->user()->hasRole('admin')) @endif @endauth
@csrf Cerrar sesión