2021-08-19 16:38:23 +02:00
|
|
|
<mwc-list activatable>
|
2021-12-14 19:22:51 +01:00
|
|
|
@php
|
|
|
|
$modules = app(\App\Http\Controllers\Controller::class)
|
|
|
|
->getModules(request());
|
|
|
|
$routes = [
|
|
|
|
'dashboard' => [
|
|
|
|
'icon' => 'view-dashboard-outline',
|
|
|
|
'text' => __('Dashboard')
|
|
|
|
],
|
|
|
|
];
|
|
|
|
foreach ($modules as $module) {
|
|
|
|
$to_merge[] = $module->routes;
|
|
|
|
}
|
|
|
|
|
|
|
|
$routes = array_merge($routes, ...$to_merge);
|
|
|
|
@endphp
|
|
|
|
@foreach($routes as $route => $details)
|
2021-08-19 16:38:23 +02:00
|
|
|
@switch($route)
|
|
|
|
@case('hr')
|
2021-12-14 19:22:51 +01:00
|
|
|
<li divider padded role="separator"></li>
|
|
|
|
@break
|
2021-08-19 16:38:23 +02:00
|
|
|
@default
|
2021-12-14 19:22:51 +01:00
|
|
|
<a class="drawer-item" href="{{Route::has($route) ? route($route) : ''}}">
|
|
|
|
<mwc-list-item graphic="icon" @if(request()->routeIs($route)) activated @endif>
|
|
|
|
<i class="mdi mdi-{{$details['icon']}}"
|
|
|
|
slot="graphic" aria-hidden="true"></i>
|
|
|
|
<span class="mdc-typography--subtitle2">{{$details['text']}}</span>
|
|
|
|
</mwc-list-item>
|
|
|
|
</a>
|
2021-08-19 16:38:23 +02:00
|
|
|
@endswitch
|
|
|
|
@endforeach
|
|
|
|
</mwc-list>
|