Skip to content
This repository was archived by the owner on Oct 15, 2023. It is now read-only.

Commit 1b10a95

Browse files
add logout btn for admin
1 parent 6018ba0 commit 1b10a95

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

resources/views/backend/admin/layouts/header.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@
7575
<h6 tabindex="-1" class="dropdown-header">Header</h6>
7676
<button type="button" tabindex="0" class="dropdown-item">Actions</button>
7777
<div tabindex="-1" class="dropdown-divider"></div>
78-
<button type="button" tabindex="0" class="dropdown-item">Dividers</button>
78+
<button type="button" tabindex="0" class="dropdown-item" onclick="event.preventDefault();
79+
document.getElementById('logout-form').submit();">Log Out</button>
80+
81+
{{-- Log Out Form --}}
82+
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
83+
@csrf
84+
</form>
7985
</div>
8086
</div>
8187
</div>

0 commit comments

Comments
 (0)