Skip to content

Commit

Permalink
Fix the menu that can only be displayed to non-admin users
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed May 11, 2024
1 parent 17a4b9e commit 0a75a56
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions resources/views/partials/header-localmenu_mobile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
<a href="{{route('dashboard')}}"
class="nav-item {{(request()->route()->getName() === 'dashboard') ? 'border-l-2 border-orange-500':''}}">
@svg('icon-dashboard', 'mr-1') {{__('Dashboard')}}</a>
<a href="{{route('dashboard.allurl')}}"
class="nav-item {{(request()->route()->getName() === 'dashboard.allurl') ? 'border-l-2 border-orange-500':''}}">
@svg('icon-link', 'mr-1') {{__('URL List')}}</a>
<a href="{{route('user.index')}}"
class="nav-item {{(request()->route()->getName() === 'user.index') ? 'border-l-2 border-orange-500':''}}">
@svg('icon-people', 'mr-1') {{__('User List')}}</a>
<a href="{{route('dashboard.about')}}"
class="nav-item {{(request()->route()->getName() === 'dashboard.about') ? 'border-l-2 border-orange-500':''}}">
@svg('icon-about-system', 'mr-1') {{__('About')}}</a>

@role('admin')
<a href="{{route('dashboard.allurl')}}"
class="nav-item {{(request()->route()->getName() === 'dashboard.allurl') ? 'border-l-2 border-orange-500':''}}">
@svg('icon-link', 'mr-1') {{__('URL List')}}</a>
<a href="{{route('user.index')}}"
class="nav-item {{(request()->route()->getName() === 'user.index') ? 'border-l-2 border-orange-500':''}}">
@svg('icon-people', 'mr-1') {{__('User List')}}</a>
<a href="{{route('dashboard.about')}}"
class="nav-item {{(request()->route()->getName() === 'dashboard.about') ? 'border-l-2 border-orange-500':''}}">
@svg('icon-about-system', 'mr-1') {{__('About')}}</a>
@endrole
</div>

0 comments on commit 0a75a56

Please sign in to comment.