8000 Add nav shortcut for admins · laravelio/laravel.io@79741f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 79741f8

Browse files
committed
Add nav shortcut for admins
1 parent 2a6efef commit 79741f8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/views/layouts/_top_nav.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@
2424
<li>
2525
<a target="_blank" href="http://forumsarchive.laravel.io/">Old Forum Archive</a>
2626
</li>
27+
28+
@if (Auth::check() && Auth::user()->hasRole('manage_users'))
29+
<li>
30+
<a href="{{ action('Admin\UsersController@getIndex') }}">Admin</a>
31+
</li>
32+
@endif
2733
</ul>
2834
</nav>
2935
<ul class="user-navigation">
30-
@if(Auth::check())
36+
@if (Auth::check())
3137
<li><a href="{{ url($currentUser->profileUrl) }}">{{ $currentUser->name }}</a></li>
3238
<li><a class="button" href="{{ action('AuthController@getLogout') }}">Logout</a></li>
3339
@else

0 commit comments

Comments
 (0)
0